0

databases Online Quiz - 109

Description: databases Online Quiz - 109
Number of Questions: 20
Created by:
Tags: databases
Attempted 0/20 Correct 0 Score 0
  1. In compiled form

  2. As source code

  3. Both A & B

  4. Not stored


Correct Option: A

What is a trigger?

  1. A piece of logic written in PL/SQL

  2. Executed at the arrival of a SQL event

  3. Both A & B

  4. None of the above


Correct Option: C

A Transaction ends

  1. Only when it is Committed

  2. Only when it is Rolled back

  3. When it is Committed or Rolled back

  4. None of the above


Correct Option: C

What are the different events in Triggers?

  1. Define, Create

  2. Insert, Update, Delete

  3. Drop, Comment

  4. All of the above


Correct Option: B

Use these data for the following Questions EMPNO ENAME SAL E100 John 3250 E200 Praveen 2000 E300 Mahesh E400 Prasanth 5500 E500 Vikram 6650 Select count (sal) from Emp will retrieve

  1. 1

  2. 0

  3. 3

  4. 4

  5. None of the above


Correct Option: D

The Data Manipulation Language statements are

  1. INSERT

  2. UPDATE

  3. SELECT

  4. All of the above


Correct Option: D

Declare a number := 5; b number := null; c number := 10; Begin if a > b AND a < c then a := c * a; end if; End; What will be the value of 'a' after execution?

  1. 50

  2. NULL

  3. 5

  4. None of the above


Correct Option: C

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) 50 - This option is incorrect because the value of 'a' will not be multiplied by 'c' since the condition in the if statement is not satisfied.

Option B) NULL - This option is incorrect because the value of 'a' is initially 5 and it will not be set to NULL in the given code.

Option C) 5 - This option is correct because the condition in the if statement is satisfied (a > b and a < c), so the value of 'a' will be updated to the product of 'c' and 'a', which is 10 * 5 = 50. Therefore, the value of 'a' will be 5 after execution.

Option D) None of the above - This option is incorrect because the correct answer is option C, as explained above.

The correct answer is C. The value of 'a' will be 5 after execution.

Find the ODD Datatype out

  1. VARCHAR2

  2. RECORD

  3. BOOLEAN

  4. RAW


Correct Option: B

A Database Procedure is stored in the Database

  1. In compiled form

  2. As source code

  3. Both A & B

  4. Not stored


Correct Option: A

What is the Result of the following 'AXA'||NULL||'US' ?

  1. Error

  2. NULL

  3. AXA US

  4. AXAUS


Correct Option: D
  1. A piece of logic written in PL/SQL

  2. Executed at the arrival of a SQL event

  3. Both A & B

  4. None of the above


Correct Option: C

A Transaction ends

  1. Only when it is Committed

  2. Only when it is Rolled back

  3. When it is Committed or Rolled back

  4. None of the above


Correct Option: C

In "Select 1 from dual;" who is the owner of Dual table?

  1. scott

  2. john

  3. sys

  4. system


Correct Option: C
Explanation:

To solve this question, the user needs to know about the DUAL table in Oracle databases.

The DUAL table is a one-row, one-column table that is automatically created by Oracle. It is owned by the SYS user and is accessible to all users.

Therefore, the correct answer is:

The Answer is: C. sys

can we rename a Synonym?

  1. True

  2. False


Correct Option: A

AI Explanation

To answer this question, we need to understand the concept of synonyms.

Synonyms are words that have similar meanings. In databases, synonyms are used to provide alternative names for database objects, such as tables, views, or procedures.

Now, let's go through each option to understand why it is correct or incorrect:

Option A) True - This option is correct because we can rename a synonym. In databases, you can use the ALTER SYNONYM statement to rename a synonym. This allows you to change the name of the synonym without affecting the underlying object it refers to.

Option B) False - This option is incorrect. As mentioned above, we can rename a synonym in databases.

The correct answer is A) True. This option is correct because we can indeed rename a synonym using the ALTER SYNONYM statement.

- Hide questions