0

databases Online Quiz - 146

Description: databases Online Quiz - 146
Number of Questions: 20
Created by:
Tags: databases
Attempted 0/20 Correct 0 Score 0

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

  1. True

  2. False


Correct Option: B
  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];


Correct Option: B
  1. table_name record_type_name;

  2. column_name record_type_name;

  3. record_type_name record_name;

  4. record_name record_type_name;


Correct Option: D

There are ______ types of loops in PL/SQL

  1. 1

  2. 3

  3. 2

  4. 4


Correct Option: B

AI Explanation

To answer this question, you need to have knowledge of the types of loops in PL/SQL. Let's go through each option to understand why it is correct or incorrect:

Option A) 1 - This option is incorrect because there are more than one type of loop in PL/SQL. Option B) 3 - This option is correct because there are indeed three types of loops in PL/SQL. Option C) 2 - This option is incorrect because there are more than two types of loops in PL/SQL. Option D) 4 - This option is incorrect because there are not four types of loops in PL/SQL.

The correct answer is B. There are three types of loops in PL/SQL, which are:

  1. FOR loop: This loop is used to iterate over a specific range of values or a collection.
  2. WHILE loop: This loop is used to repeatedly execute a set of statements as long as a certain condition is true.
  3. LOOP-EXIT loop: This loop is used to perform an infinite loop until an exit condition is met using the EXIT statement.

Therefore, the correct answer is B) 3.

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);


Correct Option: A

Which SQL keyword is used to retrieve a minimum value?

  1. MIN

  2. LOW

  3. DOWN

  4. LOWER


Correct Option: A
  1. Records

  2. Fields

  3. Attributes

  4. Cardinality


Correct Option: A
  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.


Correct Option: A
  1. Data Mode Lane

  2. Data Manipulation language

  3. Data Model Language

  4. Different Mode Level


Correct Option: B

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

  1. DELETE

  2. UNION

  3. SELECT

  4. INSERT


Correct Option: A

AI Explanation

To answer this question, you need to understand SQL commands for manipulating data in a database table.

Let's go through each option to understand why it is correct or incorrect:

Option A) DELETE - This option is correct because the DELETE command is used to remove one or more rows of data from a table in a SQL database.

Option B) UNION - This option is incorrect because the UNION command is used to combine the result sets of two or more SELECT statements.

Option C) SELECT - This option is incorrect because the SELECT command is used to retrieve data from a database table, not delete it.

Option D) INSERT - This option is incorrect because the INSERT command is used to add new rows of data into a table, not delete existing data.

The correct answer is A) DELETE. This option is correct because the DELETE command is specifically designed to delete data from a SQL database table.

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

  1. UPDATE

  2. SELECT

  3. INSERT

  4. INVERT


Correct Option: D
  1. insert and delete only

  2. update and delete only

  3. update, delete and insert

  4. insert and update only


Correct Option: C
- Hide questions