databases Online Quiz - 116

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

Assuming today is Monday, 10 July 2000, what is returned by this statement: SELECT to_char(NEXT_DAY(sysdate, 'MONDAY'), 'DD-MON-RR') FROM dual;

  1. 17-JUL-00

  2. 11-JUL-00

  3. 09-JUL-00

  4. 03-JUL-00

Correct Option: A

SELECT NULLIF('testing','testing') FROM DUAL ;

  1. testing

  2. True

  3. null

  4. error

Correct Option: C


  1. testing

  2. True

  3. null

  4. error

Correct Option: D

SELECT NVL2('first','second','testing') FROM DUAL ;

  1. third

  2. null

  3. second

  4. error

Correct Option: C

select decode('a','b','value-b','d','value-d','a','value-a','NA') result from dual;

  1. NA

  2. value-d

  3. value-b

  4. value-a

Correct Option: D
  1. A single row subquery can retrieve data from only one table.

  2. A SQL query statement cannot display data from table B that is referred to in its subquery,unless table B is included in the main query's FROM clause.

  3. A SQL query statement can display data from table B that is referred to in its subquery, without including table B in its own FROM clause

  4. A single row subquery can retrieve data from more than one table.

Correct Option: B,D
  1. You can join a maximum of two tables through an equijoin.

  2. You can join a maximum of two columns through an equijoin.

  3. You can join n tables (all having single column primary keys) in a SQL statement by specifying a minimum of n-1 join conditions.

  4. To join two tables through an equijoin, the columns in the join condition must be primary key and foreign key columns.

  5. You specify an equijoin condition in the SELECT or FROM clauses of a SELECT statement.

Correct Option: C



  4. NONE

Correct Option: B

Two reasons to create table alias :

  1. You have too many tables.

  2. You have too many columns in your tables.

  3. You want to work on your own tables.

  4. You want to use another schema's tables.

  5. Your tables have difficult names.

  6. Your tables are too long.

Correct Option: D,E
  1. You want all unmatched data from both tables.

  2. One of the tables has more data than the other.

  3. You want all matched data from both tables.

  4. You want all matched and unmatched data from only one table.

Correct Option: A
  1. A WHERE clause can be used to restrict rows only.

  2. A WHERE clause CANNOT be used in a query if the query uses a HAVING clause.

  3. WHERE clause can be used to restrict both rows and groups.

  4. WHere clause filters the columns from the output

Correct Option: A
  1. It is faster than the Delete operation.

  2. You can roll back the deletion of rows after the statement executes.

  3. You must be the owner of the table or have DELETE ANY TABLE system privileges

  4. It releases the storage space used by the table.

Correct Option: A,C,D
  1. A UNIQUE index gets created for columns with PRIMARY KEY and UNIQUE constraints.

  2. The UNIQUE constraint does not permit a null value for the column

  3. The NOT NULL constraint ensures that null values are not permitted for the column

  4. The PRIMARY KEY and FOREIGN KEY constraints create a UNIQUE index

Correct Option: B,D
  1. It is automatically used in all INSERT and UPDATE

  2. It is linked to a specific table.

  3. It belongs to a specific schema.

  4. It is automatically available to all users.

Correct Option: C
  1. Product - Many,Manufacturer - Many

  2. Product - One or Many,Manufacturer - One or Many

  3. Product - Many,Manufacturer - One

  4. Product - One,Manufacturer - One

  5. Product - One,Manufacturer - Many

Correct Option: B
- Hide questions