Oracle Database SQL Fundamentals

Test your knowledge of Oracle database concepts including SQL queries, PL/SQL programming, schema objects, views, indexes, constraints, joins, and database administration commands.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Structure of the record in the database is called

  1. Data Item
  2. Record Occurence
  3. Record
  4. Record Type
Question 2 Multiple Choice (Single Answer)

"Pages" contain

  1. Areas
  2. Record Occurence
  3. Record Type
  4. Data Item
Question 3 True/False

A "page" can have multiple record-occurences

  1. True
  2. False
Question 4 Multiple Choice (Multiple Answers)

Which two statements about views are true? (Choose two.)

  1. A view can be created as read only.
  2. A view can be created as a join on two or more tables. AND Insert and delete operations cannot be performed on views using functions
  3. A view cannot have an ORDER BY clause in the SELECT statement.
  4. A view cannot be created with a GROUP BY clause in the SELECT statement.
Question 5 Multiple Choice (Multiple Answers)

In which case would you use a FULL OUTER JOIN?

  1. Both tables have NULL values.
  2. You want all unmatched data from one table.
  3. You want all matched data from both tables.
  4. You want all unmatched data from both tables.
  5. One of the tables has more data than the other.
Question 6 Multiple Choice (Multiple Answers)

Difference between Truncate and Delete

  1. TRUNCATE is a DDL command whereas DELETE is a DML command
  2. TRUNCATE is much faster than DELETE
  3. In case of TRUNCATE ,Trigger doesn't get fired.But in DML commands like DELETE .Trigger get fired
  4. All of the above
Question 7 Multiple Choice (Multiple Answers)

Difference between Truncate and Delete(select multiple answers)

  1. TRUNCATE is a DDL command whereas DELETE is a DML command
  2. TRUNCATE is much faster than DELETE
  3. In case of TRUNCATE ,Trigger doesn't get fired.But in DML commands like DELETE .Trigger get fired
  4. All of the above
Question 8 Multiple Choice (Single Answer)

Which data dictionary table should you query to view the object privileges granted to the user on specific columns?

  1. USER_TAB_PRIVS_MADE
  2. USER_TAB_PRIVS_RECD
  3. USER_COL_PRIVS_MADE
  4. USER_COL_PRIVS_RECD
Question 9 Multiple Choice (Single Answer)

Which of the following are the valid ordering sequences of an ORDER BY clause?

  1. A. ASEC
  2. B. DESC
  3. C. REVERT
  4. D. ASC
  5. Both B and D
  6. Both A and B
Question 10 Multiple Choice (Single Answer)

Which clause should you use to restrict group results

  1. WHERE
  2. HAVING
  3. RESTRICT
  4. ORDER BY
  5. GROUP BY
  6. Both A and B
Question 11 Multiple Choice (Single Answer)

Merge Syntax

  1. A. MERGE INTO <<target_table_name>> USING <<source_table_name>> WHEN MATCHED THEN UPDATE ------ WHEN NOT MATCHED THEN INSERT -------
  2. B. MERGE <<target_table_name>> USING <<source_table_name>> WHEN MATCHED THEN UPDATE ------ WHEN NOT MATCHED THEN INSERT -------
  3. C. MERGE INTO <<target_table_name>> USING <<source_table_name>> WHEN EXISTS THEN UPDATE ------
  4. D. MERGE INTO <<target_table_name>> USING <<source_table_name>> WHEN NOT MATCHED THEN INSERT ------
  5. Both A and D
Question 12 Multiple Choice (Multiple Answers)

Which two statements about sequences are true?

  1. A. You use a NEXTVAL pseudo column to look at the next possible value that would be generated from a sequence, without actually retrieving the value
  2. B. You use a CURRVAL pseudo column to look at the current value just Generated from a sequence, without affecting the further values to be generated from the sequence.
  3. You use a NEXTVAL pseudo column to obtain the next possible value from a sequence by actually retrieving the value from the sequence
  4. Both A and B
Question 13 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. Use the DESCRIBE VIEW command on the EMP_DEPT VU view
  4. Query the USER_VIEWS data dictionary view to search for the EMP_DEPT_VU view
Question 14 Multiple Choice (Single Answer)

For which two constraints does the Oracle Server implicitly create a unique index?

  1. NOT NULL and PRIMARY KEY
  2. PRIMARY KEY and UNIQUE key
  3. FOREIGN KEY and PRIMARY KEY
  4. CHECK
  5. UNIQUE
Question 15 Multiple Choice (Single Answer)

SELECT ROUND(TRUNC(MOD(1600,10),-1),2) FROM dual; What will be displayed?

  1. 0
  2. NULL
  3. 0.1
  4. NA
Question 16 Multiple Choice (Single Answer)

You created a view called EMP_DEPT_VU that contains three columns from the EMPLOYEES and DEPARTMENTS tables: EMPLOYEE_ID, EMPLOYEE_NAME AND DEPARTMENT_NAME. The DEPARTMENT_ID column of the EMPLOYEES table is the foreign key to the primary key DEPARTMENT_ID column of the DEPARTMENTS table. You want to modify the view by adding a fourth column, MANAGER_ID of NUMBER data type from the EMPLOYEES tables. How can you accomplish this task?

  1. ALTER VIEW emp_dept_vu (ADD manager_id NUMBER);
  2. MODIFY VIEW emp_dept_vu (ADD manager_id NUMBER);
  3. ALTER VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employee e, departments d WHERE e.department_id = d.department_id;
  4. CREATE OR REPLACE VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employees e, departments d WHERE e.department_id = d.department_id;
Question 17 Multiple Choice (Multiple Answers)

In ISQL plus how to see errorsof a plsql code

  1. A.SHOW ERRORS
  2. B. Query the USER_ERRORS data dictionary view
  3. Both A and B
  4. None of the above
Question 18 Multiple Choice (Multiple Answers)

Bit map Vs B-tree indexes

  1. 1. Bit map indexes are used on low-cardinality columns(having low distinct values) 2.B-tree indexes are most effective for high-cardinality data(only for unique columns)
  2. B-tree indexes cannot be used in environments typically have large amounts of data and ad hoc queries
  3. bitmap indexes can be created on partitioned tables
  4. All of the above
Question 19 True/False

Syntax of Cursor declaration: Cursor <> as select * from <>;

  1. True
  2. False
Question 20 Multiple Choice (Multiple Answers)

Which of the following is not a schema object :

  1. Indexes
  2. tables
  3. public synonyms
  4. triggers
  5. packages