0

databases Online Quiz - 186

Description: databases Online Quiz - 186
Number of Questions: 20
Created by:
Tags: databases
Attempted 0/20 Correct 0 Score 0
  1. Create groups of data

  2. Sort data in a specific order

  3. Convert data to a different format

  4. Retrieve data based on an unknown condition


Correct Option: D
  1. query will retrieve only one row

  2. authorization failure

  3. no such code available

  4. rollback


Correct Option: B

choose the environments which can access DB2

  1. TSO

  2. IMC

  3. CICS

  4. None of the above


Correct Option: A,C

5 rows are inserted to a DB2 Table. Next 3 of those are updated, then a rollback is issued. What would happen when the rollback is issued?

  1. returns 5 rows

  2. returns 3 rows

  3. returns all 8rows

  4. none


Correct Option: B

Which are true regarding the use of outer joins?

  1. You cannot use IN operator in a condition that involves an outerjoin

  2. You use (+) on both sides of the WHERE condition to perform an outerjoin

  3. You use (*) on both sides of the WHERE condition to perform an outerjoin

  4. You use an outerjoin to see only the rows that do not meet the join condition

  5. In the WHERE condition, you use (+) following the name of the column in the table

  6. You cannot link a condition that is involved in an outerjoin to another condition by


Correct Option: D,E,F
  1. DELETE employees;

  2. DESCRIBE employees;

  3. ROLLBACK TO SAVEPOINT C;

  4. GRANT SELECT ON employees TO SCOTT;

  5. ALTER TABLE employees SET UNUSED COLUMN sal;

  6. Select MAX(sal) FROM employees WHERE department_id = 20;


Correct Option: C,E

Which two are true about aggregate functions? (Choose two.)

  1. You can use aggregate functions in any clause of a SELECT statement.

  2. You can use aggregate functions only in the column list of the SELECT clause and in the WHERE clause of a SELECT statement.

  3. You can mix single row columns with aggregate functions in the column list of a SELECT statement by grouping on the single row columns.

  4. You can pass column names, expressions, constants, or functions as parameters to an aggregate function.

  5. You can use aggregate functions on a table, only by grouping the whole table as one single group.

  6. You cannot group the rows of a table by more than one column while using aggregate functions.


Correct Option: C,D

Which of the following is non-PL/SQL variable?

  1. Scalar

  2. LOB

  3. Reference

  4. host


Correct Option: D

PL/SQL does not support boolean variables

  1. True

  2. False


Correct Option: B

Which four are valid Oracle constraint types?

  1. CASCADE

  2. UNIQUE

  3. NONUNIQUE

  4. CHECK

  5. PRIMARY KEY

  6. NOT NULL


Correct Option: B,D,E,F

Which is an iSQL*PLUS command?

  1. INSERT

  2. UPDATE

  3. SELECT

  4. DESCRIBE

  5. DELETE

  6. RENAME


Correct Option: D

Top N analysis requires _____ and ______?(Choose two)

  1. the use of rowed

  2. a GROUP BY clause

  3. an ORDER BY clause

  4. only an inline view

  5. an inline view and an outer query


Correct Option: C,E

Which constraint can be defined only at the column level?

  1. UNIQUE

  2. NOT NULL

  3. CHECK

  4. PRIMARY KEY

  5. FOREIGN KEY


Correct Option: B

What does the FORCE option for creating a view do?

  1. creates a view with constraints

  2. creates a view even if the underlying parent table has constraints

  3. creates a view in another schema even if you don't have privileges

  4. creates a view regardless of whether or not the base tables exist


Correct Option: D

The user Alice wants to grant all users query privileges on her DEPT table. Which SQL statement accomplishes this?

  1. GRANT select ON dept TO ALL USERS;

  2. GRANT select ON dept TO ALL;

  3. GRANT QUERY ON dept TO ALL USERS;

  4. GRANT select ON dept TO PUBLIC;


Correct Option: D

Which three are true?(Choose three)

  1. A MERGE statement is used to merge the data of one table with data from another

  2. A MERGE statement replaces the data of one table with that of another

  3. A MERGE statement can be used to insert new rows into a table

  4. A MERGE statement can be used to update existing rows in a table


Correct Option: A,B,C

What is true about Sequences?

  1. Once created, a sequence belongs to a specific schema

  2. Once created, a sequence is linked to a specific table

  3. Once created, a sequence is automatically available to all users

  4. Only the DBA can control which squence is used by certain a table

  5. Once created, a sequence is automatically in all INSERT and UPDATE statements


Correct Option: C

John has created a procedure named SALARY_CALC. Which SQL query allows him to view the text of the procedure?

  1. SELECT text FROM user_source WHERE name ='SALARY_CALC';

  2. SELECT * FROM user_source WHERE source_name ='salary_calc';

  3. SELECT * FROM user_objects WHERE object_name = 'SALARY_CALC';

  4. SELECT text FROM user_source WHERE name='SALARY_CALC' AND owner ='JOHN';


Correct Option: A
- Hide questions