0

databases Online Quiz - 142

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

What is true about triggers I. instead of trigger can be used on tables and views 2. instead of trigger can fire at eah row and statement levels. 3. Compund trigger in 10g allows us to specify multiple timig events on single database objects. 4. we should not use the same object which fired the trigger inside the trigger. this will result in mutating trigger error.

  1. 2 and 4 are true

  2. 1 , 3 and 4 are true

  3. 1 and 3 are true

  4. Only 4 is true


Correct Option: D
  1. Union all used for combining multiples queries using single union all

  2. There is no difference

  3. the union will eliminate duplicate records in result set but, union all will print the duplicate records

  4. Union all is used for select with multiple columns


Correct Option: C

What is the default value for the OPTIMIZER_MODE initialization parameter?

  1. FIRST_ROWS

  2. ALL_ROWS

  3. CHOOSE

  4. COST


Correct Option: C

Can we have multiple primary keys in a table?

  1. True

  2. False


Correct Option: B

Which are the aggregate functions?

  1. SUM

  2. AVG

  3. trim

  4. median


Correct Option: A,B,D
  1. user_constraints

  2. user_tables

  3. user_cons_columns

  4. all_tab_cols


Correct Option: A,C

Comparision of Decode and case statement

  1. Both are same

  2. case can check for non equality operator but decode checks for equality operator

  3. decode can be used for comparing value of one variable/condition. but case can check for multiple conditions

  4. case can not be used in where clause. but decode can be used.


Correct Option: B,C
  1. COMMIT

  2. MERGE

  3. UPDATE

  4. DELETE

  5. CREATE

  6. DROP


Correct Option: B,C,D

Among these Which are the system variables

  1. SYSDATE

  2. USER

  3. USERENV

  4. ALL THE ABOVE


Correct Option: D

Evaluate this SQL statement: SELECT ename, sal, 12*sal+100 FROM emp; The SAL column stores the monthly salary of the employee. Which change must be made to the above syntax to calculate the annual compensation as "monthly salary plus a monthly bonus of $100, multiplied by 12"? Evaluate this SQL statement: SELECT ename, sal, 12*sal+100 FROM emp; The SAL column stores the monthly salary of the employee. Which change must be made to the above syntax to calculate the annual compensation as "monthly salary plus a monthly bonus of $100, multiplied by 12"? A. No change is required to achieve the desired results. B. SELECT ename, sal, 12*(sal+100) FROM emp; C. SELECT ename, sal, (12*sal)+100 FROM emp; D. SELECT ename, sal+100,*12 FROM emp;

  1. A

  2. B

  3. C

  4. D


Correct Option: B
  1. Faster operation during INSERT commands

  2. Faster operation during UPDATE commands

  3. Faster operation during SELECT commands

  4. Faster operation during DELETE commands


Correct Option: D
  1. RENAME table_name new_table_name;

  2. RENAME table_name TO new_table_name;

  3. RENAME TABLE table_name new_table_name;

  4. RENAME TABLE table_name TO new_table_name;


Correct Option: B
- Hide questions