Oracle SQL Fundamentals

Test your knowledge of Oracle SQL syntax, functions, querying, and database concepts including ROWNUM, TO_DATE, indexes, triggers, and SQL*Plus commands.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

With SQL, how do you select all the columns from a table named "Persons"?

  1. SELECT [all] FROM Persons
  2. SELECT Persons
  3. SELECT *.Persons
  4. SELECT * FROM Persons
Question 2 Multiple Choice (Multiple Answers)

Which two are attributes of iSQL*Plus? (Choose two)

  1. iSQL*Plus commands manipulate table definitions in the database.
  2. iSQL*Plus is the Oracle proprietary interface for executing SQL statements.
  3. iSQL*Plus commands cannot be abbreviated.
  4. iSQL*Plus commands are accesses from a browser.
Question 3 Multiple Choice (Single Answer)

You need to perform certain data manipulation operations through a view called EMP_DEPT_VU, which you previously created. You want to look at the definition of the view (the SELECT statement on which the view was create.) How do you obtain the definition of the view?

  1. Use the DESCRIBE command in the EMP_DEPT VU view.
  2. Use the DEFINE VIEW command on the EMP_DEPT VU view.
  3. Query the USER_VIEWS data dictionary view to search for the EMP_DEPT_VU view.
  4. Query the USER_SOURCE data dictionary view to search for the EMP_DEPT_VU view.
Question 4 Multiple Choice (Single Answer)

Which is an /SQL*Plus command?

  1. insert
  2. update
  3. select
  4. describe
Question 5 Multiple Choice (Single Answer)

Evaluate this SQL statement: SELECT e.EMPLOYEE_ID,e.LAST_NAME,e.DEPARTMENT_ID, d.DEPARTMENT_NAME. FROM EMP e, DEPARTMENT d WHERE e.DEPARTMENT_ID = d.DEPARTMENT_ID; In the statement, which capabilities of a SELECT statement are performed?

  1. Selection, projection, join
  2. Difference, projection, join
  3. Selection, intersection, join
  4. Intersection, projection, join
Question 6 True/False

:new can be used in stament level trigger

  1. True
  2. False
Question 7 True/False

Order by cause should be used only at end of query

  1. True
  2. False
Question 8 True/False

union all is faster than union

  1. True
  2. False
Question 9 True/False

bitmap index should be created on columns which have high cardinality

  1. True
  2. False
Question 10 Multiple Choice (Single Answer)

what is max length of table name in oracle

  1. 50
  2. 30
  3. 20
  4. 40
Question 11 Multiple Choice (Single Answer)

Oracle is written in which language

  1. sql
  2. java
  3. unix
  4. plsql
Question 12 Multiple Choice (Single Answer)

Answer the below query.. select to_date('01-01-51','DD-MM-YY') from dual ;

  1. 1/1/0051
  2. 1/1/1951
  3. 1/1/2051
  4. 1/1/9951
Question 13 Multiple Choice (Single Answer)

Answer the below query.. select to_date('01-01-51','DD-MM-RR') from dual

  1. 1/1/2051
  2. 1/1/1951
  3. 1/1/0051
  4. 1/1/9951
Question 14 True/False

The out put of the below two queries will be same 1.select to_date('01-01-99','DD-MM-YY') from dual 2.select to_date('01-01-99','DD-MM-RR') from dual

  1. True
  2. False
Question 15 True/False

The output of the below two queries will be same. 1.select to_date('01-01-00','DD-MM-YY') from dual 2.select to_date('01-01-00','DD-MM-RR') from dual

  1. True
  2. False
Question 16 Multiple Choice (Single Answer)

Output of the below query will be.. select '#' from dual;

  1. Error: invalid identifier
  2. Error : Invalid Character
  3. NULL
  4. #
Question 17 Multiple Choice (Single Answer)

Output of the below query.. select # from dual;

  1. Error : Invalid Character
  2. Error : Invalid identifier
  3. #
  4. NULL
Question 18 True/False

Output of the below two queries would be same.. 1.select 1 from dual; 2.select '1' from dual;

  1. True
  2. False
Question 19 Multiple Choice (Single Answer)

How many rows records the following query will display.. select * from TEMP where rownum between 0 and 3 ? N.R. Temp table has 30 records

  1. 1 row
  2. NULL
  3. 30 rows
  4. 3 rows
  5. 2 rows
Question 20 Multiple Choice (Single Answer)

How many rows records the following query will display.. select * from TEMP where rownum in (1,3); N.R. Temp table has 30 records

  1. 1 row
  2. NULL
  3. 0 row
  4. 3 rows
  5. 30 rows
  6. 2 rows