wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

PLSQL and Cursor Quiz

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

PL SQL Stands for

a)

Programming Language for SQL

b)

Procedural Language for SQL

c)

Plain Language for SQL

d)

None of these

2.

Name 4 attributes of explicit cursors

a)

%FOUND,%NOTFOUND,%ROWCOUNT,%ISOPEN

b)

%FOUND,%NOTFOUND,%ISCLOSE,%ISOPEN

c)

%FOUND,%OPEN,%ROWCOUNT,%ISOPEN

d)

None of these

3.

The name given for Implicit cursor is?

a)

PLSQL

b)

SQL

c)

CURSOR

d)

All the above

4.

Is the Syntax right using the EMP Table in the DECLARE block

DECLARE

CURSOR C1(DNO OUT EMP.DEPTNO%TYPE) IS SELECT * FROM EMP

WHERE DEPTNO=DNO FOR UPDATE NOWAIT 5;

a)

Correct

b)

Incorrect

5.

________ provide a way for your program to select multiple rows of data from the database and then process each row individually.

a)

Trigger

b)

Cursor

c)

Select

d)

Procedure

6.

_____cursor is declared by ORACLE for each UPDATE, DELETE and INSERT SQL commands.

a)

Internal

b)

External

c)

Implicit

d)

Explicit

7.

_______ is used to recreate if trigger already exists

a)

Create

b)

Cursor

c)

Procedure

d)

Replace

8.

What is wrong in the following code snippet?

DECLARE

x number := 1;

BEGIN

LOOP

dbms_output.put_line(x);

x := x + 1;

IF x > 10 THEN

exit;

END IF;

dbms_output.put_line('After Exit x is: ' || x);

END;

a)

Code is correct.

b)

IF statement is not required.

c)

END LOOP is missing.

d)

Every IF must have ELSE statement.

9.

Consider the following code snippet: what will be the output?

DECLARE

a number(2) ;

BEGIN

FOR a IN REVERSE 10 .. 20 LOOP

END LOOP;

dbms_output.put_line(a);

END;

a)

20

b)

29

c)

10

d)

30

10.

What will be the output of the following code snippet?

a)

21

b)

21, 10

c)

10

d)

error