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

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

  1. True

  2. False


Correct Option: A

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

  1. True

  2. False


Correct Option: B

PDoees PL/SQL stands for Procedural Language extension of SQL

  1. True

  2. False


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

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;


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.

  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

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

  1. True

  2. False


Correct Option: B

Which SQL keyword is used to retrieve a minimum value?

  1. MIN

  2. LOW

  3. DOWN

  4. LOWER


Correct Option: A

The table rows are also known as...

  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

What does DML stand for?

  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.

  1. UPDATE

  2. SELECT

  3. INSERT

  4. INVERT


Correct Option: D
Explanation:

To solve this question, the user needs to have basic knowledge of SQL keywords and clauses. SQL (Structured Query Language) is a standard language for managing relational databases. It is important to know which words and clauses are part of SQL and which are not.

Now, let's go through each option and explain why it is right or wrong:

A. UPDATE: This is a SQL keyword that is used to modify existing records in a table.

B. SELECT: This is a SQL keyword that is used to query data from a table.

C. INSERT: This is a SQL keyword that is used to insert new records into a table.

D. INVERT: This is not a SQL keyword or SQL clause. It is not used in SQL to perform any operation.

Therefore, the answer is: D. INVERT.

There are triggers for…

  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