SQL and PL/SQL Fundamentals

Quiz covering SQL commands, functions, PL/SQL programming, cursors, triggers, and database management concepts

20 Questions Published

Questions

Question 1 True/False

If you use the CREATE DATABASE statement on an existing database, all data in the datafiles will be lost.

  1. True
  2. False
Question 2 True/False

The ALTER TRIGGER command can be used to change the definition of an existing trigger.

  1. True
  2. False
Question 3 True/False

PDoees PL/SQL stands for Procedural Language extension of SQL

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

What is the syntax of select .... into statement

  1. SELECT row_name INTO variable_name FROM table_name [WHERE condition];
  2. SELECT column_name INTO variable_name FROM table_name [WHERE condition];
  3. SELECT column_name INTO variable_name FROM table_name [WHEN condition];
  4. SELECT table_name INTO variable_name FROM table_name [WHERE condition];
Question 5 Multiple Choice (Single Answer)

The Syntax to declare a record of a User-defined datatype is:

  1. table_name record_type_name;
  2. column_name record_type_name;
  3. record_type_name record_name;
  4. record_name record_type_name;
Question 6 Multiple Choice (Single Answer)

There are ______ types of loops in PL/SQL

  1. 1
  2. 3
  3. 2
  4. 4
Question 7 Multiple Choice (Single Answer)

Which of the following is not a way to execute stored functions

  1. EXECUTE [or EXEC] database.function_name;
  2. employee_name := employer_details_func;
  3. SELECT employer_details_func FROM dual;
  4. dbms_output.put_line(employer_details_func);
Question 8 True/False

SQL%ISOPEN attribute always returns null in implicit Cursors.

  1. True
  2. False
Question 9 True/False

Implicit Cursors are created by users in PL/SQL block.

  1. True
  2. False
Question 10 True/False

Oracle engine creates Cursors for every SELECT statements.

  1. True
  2. False
Question 11 True/False

There are 4 attributes of Cursor variables

  1. True
  2. False
Question 12 True/False

Explicit Cursors need to be opened in DECLARE section.

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

Which SQL keyword is used to retrieve a minimum value?

  1. MIN
  2. LOW
  3. DOWN
  4. LOWER
Question 14 Multiple Choice (Single Answer)

The table rows are also known as...

  1. Records
  2. Fields
  3. Attributes
  4. Cardinality
Question 15 Multiple Choice (Single Answer)

What is the ABS SQL function used for?

  1. To return the absolute, positive value of a numeric expression.
  2. To return the average value of a numeric expression.
  3. To return the maximum value of a numeric expression.
  4. To return the minimum value of a numeric expression.
Question 16 Multiple Choice (Single Answer)

Which SQL keyword is used to retrieve only unique values?

  1. DISTINCTIVE
  2. UNIQUE
  3. DISTINCT
  4. DIFFERENT
Question 17 Multiple Choice (Single Answer)

What does DML stand for?

  1. Data Mode Lane
  2. Data Manipulation language
  3. Data Model Language
  4. Different Mode Level
Question 18 Multiple Choice (Single Answer)

Which of the following commands is used to delete data from a SQL database table?

  1. DELETE
  2. UNION
  3. SELECT
  4. INSERT
Question 19 Multiple Choice (Single Answer)

Which of the following is not a SQL keyword or SQL clause?

  1. UPDATE
  2. SELECT
  3. INSERT
  4. INVERT
Question 20 Multiple Choice (Single Answer)

There are triggers for…

  1. insert and delete only
  2. update and delete only
  3. update, delete and insert
  4. insert and update only