Multiple Choice Questions (MCQ) on Oracle SQL

Multiple Choice Questions (MCQ) on Oracle SQL

1- Which of the following date function can be used to get the timestamp from database?

(A) SYSTEMTIMESTAMP

(B) SYSTIMESTAMP

(C) SYSTEMDATE

(D) SYSDATE

 

2- ________ are PL/SQL programs that are set up to execute in response to a particular event on a table in the database.

(A) Package

(B) Functions

(C) Triggers

(D) Procedure

 

3- Which of the following statement(s) is/are FALSE about ORDER BY clause?

(A) Order by only works on number column

(B) Where clause cannot be used after order by clause

(C) Order by default sort is ascending order

(D) Order by can be used with DATE attributes

 

4- A program that resides inside an oracle database that manipulates data in the database before the data is used outside the database is known as __________.

(A) Triggers

(B) Function

(C) Stored procedure

(D) Package

 

5- Which of the following columns in a table cannot be updated?

(A) DATE type columns in the table

(B) Columns which allows NULL values in the table

(C) A Primary key column which also serves as foreign key reference in another table

(D) All of the above

 

6- The ______ pre-compiler translates embedded SQL into calls to the Oracle runtime library.

(A) ApexSQL

(B) Pro*C

(C) ORM

(D) None of the above

 

7- What is true about the INSERT statement in Oracle SQL?

(A) An INSERT statement cannot be used if a constraint is placed on the table

(B) An INSERT statement can override any constraint put on the table

(C) An INSERT statement can never insert a row that violates a constraint

(D) An INSERT statement can be used only if a constraint is placed on the table

 

8- Which prefixes are available to Oracle triggers?

(A) Neither :new nor : old

(B) Both :new and : old

(C) : old only

(D) : new only

 

9- Which of the following statement is TRUE about Group By clause?

(A) Aggregate function cannot be used in query containing GROUP BY

(B) GROUP BY removes NULL values from result

(C) Columns specified in SELECT clause must be part of the GROUP BY clause

(D) Columns specified in GROUP BY clause must be part of the SELECT clause

 

10- If no header is specified, the block is said to be …………………. PL/SQL block.

(A) Anonymous

(B) Empty

(C) Weak

(D) Strong

 

ANSWERS:

1-(B), 2-(C), 3-(A), 4-(C), 5-(C), 6-(B), 7-(C), 8-(B), 9-(C), 10-(A)