Oracle Database and SQL Fundamentals

Test your knowledge of Oracle database concepts, SQL statements, stored procedures, triggers, and PL/SQL programming.

20 Questions Published

Questions

Question 1 Multiple Choice (Multiple Answers)

What is true of using group functions on columns that contain NULL Values

  1. Group functions on columns ignore NULL values.
  2. Group functions on columns returning dates include NULL values
  3. Group functions on columns returning numbers include NULL values.
  4. Group functions on columns cannot be accurately used on columns that contain NULL values.
Question 2 True/False

You cannot modify data in a view if it contains: Group functions such as SUM, MIN, MAX, AVG, … A GROUP BY clause. The DISTINCT keyword. Columns defined by expressions (i.e, SAL * 12). The ROWNUM pseudo column.

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

Which table should you query to determine when your procedure was last compiled?

  1. USER_OBJECTS
  2. USER_PROCEDURES
  3. USER_PROCS
  4. USER_PLSQL_UNITS
Question 4 True/False

A transaction is a set of SQL statements between any two COMMIT and ROLLBACK statements

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

Which of the following syntax is correct for creating a proc

  1. CREATE OR REPLACE PROCEDURE <<Procedure name>> as
  2. CREATE OR REPLACE PROCEDURE <<Procedure name>>(Parameter list) as
  3. CREATE OR REPLACE PROCEDURE <<Procedure name>> is
  4. All of the above
Question 6 Multiple Choice (Multiple Answers)

Choose correct statement below

  1. When a parameter is passed as an IN variable it is passed by reference
  2. When variables are passed in OUT or INOUT mode it is pass by value
  3. The NOCOPY clause tells to PL/SQL engine to pass the variable by reference
  4. All of the above
Question 7 Multiple Choice (Multiple Answers)

How can you migrate from a LONG to a LOB data type for a column?

  1. Use the DBMS_MANAGE_LOB.MIGRATE procedure
  2. Use the UTL_MANAGE_LOB.MIGRATE procedure.
  3. Use the ALTER TABLE command
  4. You cannot migrate from a LONG to a LOB date type for a column
Question 8 Multiple Choice (Multiple Answers)

You need to create a trigger on the EMP table that monitors every row that is changed and places this information into the AUDIT_TABLE. What type of trigger do you create?

  1. FOR EACH ROW trigger on the EMP table.
  2. Statement-level trigger on the EMP table.
  3. FOR EACH ROW trigger on the AUDIT_TABLE table.
  4. Statement-level trigger on the AUDIT_TABLE table.
Question 9 True/False

NOARCHIVELOG mode does have the advantage of not having to write transactions to an archive log and thus increases the performance of the database slightly.

  1. True
  2. False
Question 10 True/False

The ANALYZE command is used to gather statistics on a table

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

Before making a tablespace read only, which of the following conditions must be met

  1. The tablespace must be online
  2. The tablespace must not contain any active rollback segments
  3. he tablespace must not be involved in an open backup
  4. All of the above
Question 12 Multiple Choice (Multiple Answers)

Select correct type of parameter mode used in oracle

  1. IN
  2. OUT
  3. IN OUT
  4. All of the above
Question 13 Multiple Choice (Multiple Answers)

You need to remove the database trigger T1. Which command do you use to remove the trigger in the SQL *Plus environment?

  1. DROP TRIGGER T1
  2. DELETE TRIGGER T1
  3. ALTER TRIGGER T1 DISABLE
  4. None of the above
Question 14 True/False

A cold backup is taking a backup of the database while it is shut down and does not require being in archive log mode.

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

What tablespace is automatically created when we create a database

  1. The Default tablespace
  2. The temp tablespace
  3. The SYSTEM tablespace
  4. None of the above
Question 16 Multiple Choice (Multiple Answers)

In which four clauses can a subquery be used?

  1. in the INTO clause of an INSERT statement
  2. in the GROUP BY clause of a SELECT statement
  3. in the VALUES clause of an INSERT statement
  4. in the ORDER BY clause of a SELECT statement
Question 17 Multiple Choice (Multiple Answers)

Uses of SSIS

  1. to move data from one data source to another
  2. powerful ETL tool
  3. To design various kind of reports
  4. to provide business information to a wider audience within an organization
Question 18 Multiple Choice (Single Answer)

What does the following SQL statement do: SELECT Customer, COUNT(Order) FROM Sales GROUP BY Customer HAVING COUNT(Order) >5

  1. Selects the total number of orders from the Sales table, if this number is greater than 5
  2. Selects all customers from table Sales that have made more than 5 orders.
  3. Selects all Customers from the Sales table
  4. None of the above
Question 19 Multiple Choice (Single Answer)

Which of the following SQL statements is correct?

  1. TRUNCATE Sales TABLE
  2. TRUNCATE * FROM TABLE Sales
  3. TRUNCATE TABLE Sales
  4. All the above
Question 20 Multiple Choice (Single Answer)

What is a stored procedure?

  1. A process for data export/import.
  2. A set of SQL statements stored and executed as a single entity.
  3. A process to convert tables.
  4. Data stored in a database.