Oracle Database Fundamentals and SQL

Test your knowledge of Oracle database concepts including SQL queries, triggers, normalization, tablespaces, date functions, and transaction management.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

What conditions have to be met before dropping a tablespace?

  1. The tablespace must be offline
  2. The tablespace must be online
  3. The tablespace cannot have active segments
  4. The administrator NOT needs the correct system privilege
Question 2 Multiple Choice (Single Answer)

Which of the following events can be used to fire triggers?

  1. sysdate
  2. Truncate
  3. avg
  4. To_date
Question 3 Multiple Choice (Single Answer)

Which names are NOT appropriate database object names?

  1. "SELECT"
  2. "_Marketing"
  3. m364DaYs
  4. SELECT
Question 4 Multiple Choice (Single Answer)

Which of the following queries can you use to search for employees with the pattern 'A_B' in their names?

  1. SELECT last_name FROM employees WHERE last_name LIKE '%A_B%' ESCAPE '\';
  2. SELECT last_name FROM employees WHERE last_name LIKE '%A_B%' ESCAPE;
  3. SELECT last_name FROM employees WHERE last_name LIKE 'A_B%' ESCAPE '%';
  4. SELECT last_name FROM employees WHERE last_name LIKE '%A_B%' ESCAPE '';
Question 5 Multiple Choice (Single Answer)

To write a query that performs an outer join of tables A and B and returns all rows from B, You need to write

  1. any outer join
  2. a left outer join
  3. a cross join
  4. a right outer join
Question 6 Multiple Choice (Multiple Answers)

15 Examine the description of the STUDENTS table: STD_ID NUMBER (4) COURSE_ID VARCHAR2 (10) START_DATE DATE END_DATE DATE Which two aggregate functions are valid on the START_DATE column? (Choose two)

  1. SUM(start_date)
  2. AVG(start_date)
  3. COUNT(start_date)
  4. MIN(start_date)
Question 7 Multiple Choice (Single Answer)

You would like to display the system date in the format "Monday, 01 June, 2001". Which SELECT statement should you use?

  1. SELECT TO_DATE (SYSDATE, 'FMDAY, DD Month, YYYY') FROM dual;
  2. SELECT TO_CHAR (SYSDATE, 'FMDD, DY Month, YYYY') FROM dual;
  3. SELECT TO_CHAR (SYSDATE, 'FMDay, DD Month, YYYY') FROM dual;
  4. SELECT TO_CHAR (SYSDATE, 'FMDY, DDD Month, YYYY') FROM dual;
Question 8 Multiple Choice (Multiple Answers)

Which two statements complete a transaction? (Choose two.)

  1. DELETE employees;
  2. DESCRIBE employees;
  3. ROLLBACK TO SAVEPOINT C;
  4. ALTER TABLE employees SET UNUSED COLUMN sal;
  5. GRANT SELECT ON employees TO SCOTT;
Question 9 Multiple Choice (Single Answer)

Which object privileges can be granted on a view?

  1. none
  2. DELETE, INSERT, SELECT
  3. ALTER, DELETE, INSERT, SELECT
  4. DELETE, INSERT, SELECT, UPDATE
Question 10 Multiple Choice (Single Answer)

Which command will delete all data from a table and will not write to the rollback segment?

  1. DROP
  2. DELETE
  3. CASCADE
  4. TRUNCATE
Question 11 Multiple Choice (Single Answer)

Which Oracle access method is the fastest way for Oracle to retrieve a single row?

  1. Primary key access
  2. Access via unique index
  3. Table access by ROWID
  4. Full table scan
Question 12 Multiple Choice (Single Answer)

Which character function can be used to return a specified portion of a character string?

  1. INSTR
  2. SUBSTR
  3. SUBSTRING
  4. POS
Question 13 Multiple Choice (Single Answer)

When a user creates an object without a TABLESPACE clause, where will Oracle store the segment?

  1. System tablespace
  2. Users tablespace
  3. Default tablespace for the user
  4. Oracle will give an error
  5. Undefined
Question 14 Multiple Choice (Single Answer)

Which character is used to continue a statement in SQL*Plus?

  1. *
  2. #
  3. /
  4. -
  5. @
Question 15 Multiple Choice (Single Answer)

Assuming today is Friday, 28 August 2009, what is returned by this statement: SELECT to_char(NEXT_DAY(sysdate, 'FRIDAY'), 'DD-MON-RR') FROM dual;

  1. 21-AUG-09
  2. 28-AUG-09
  3. 04-SEP-09
  4. 29-AUG-09
  5. 27-AUG-09
Question 16 Multiple Choice (Single Answer)

To produce a meaningful result set without any cartesian products, what is the minimum number of conditions that should appear in the WHERE clause of a four-table join?

  1. 8
  2. 3
  3. 5
  4. There is no such criteria
Question 17 Multiple Choice (Single Answer)

Which of the following can be a valid column name?

  1. Column
  2. 1966_Invoices
  3. Catch_#22
  4. #Invoices
  5. None of the above
Question 18 Multiple Choice (Single Answer)

Normalization is…

  1. the process of arranging information stored in a database in a way, which removes redundancy and ambiguity.
  2. a special way of selecting data
  3. the process of adding primary key to a table
  4. All the above
Question 19 Multiple Choice (Single Answer)

A trigger is…

  1. a special type of store procedure, executed when certain event occurs
  2. a special type of table
  3. a special type of view
  4. All the above
Question 20 Multiple Choice (Single Answer)

Which SQL statement selects all rows from table called Contest, with column ContestDate having values greater or equal to May 25, 20006?

  1. SELECT * FROM Contest WHERE ContestDate < '05/25/2006'
  2. SELECT * FROM Contest HAVING ContestDate >= '05/25/2006'
  3. SELECT * FROM Contest WHERE ContestDate >= '05/25/2006'
  4. none of the above