0% found this document useful (0 votes)
3K views3 pages

PLSQL Quiz

The document contains multiple choice questions about PL/SQL concepts like procedures, packages, variables, cursors, loops, and exceptions. It tests knowledge of PL/SQL fundamentals like parameter passing, variable scope, implicit and explicit cursors, and control structures. The questions cover a range of core PL/SQL topics for developers to understand.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3K views3 pages

PLSQL Quiz

The document contains multiple choice questions about PL/SQL concepts like procedures, packages, variables, cursors, loops, and exceptions. It tests knowledge of PL/SQL fundamentals like parameter passing, variable scope, implicit and explicit cursors, and control structures. The questions cover a range of core PL/SQL topics for developers to understand.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

6.

Select the best answerPROCEDURE foo ( p_foo_text IN VARCHAR2


A. Variables
B. IN OUT Parameters
C. Name
D. Signature
E. None of the above

7. Select the best answerPACKAGE foo_foo ISPROCEDURE foo( p_foo_text IN


VARCHAR2 );PROCEDURE foo(p_foo_number IN NUMBER);END;
A. Package specification is invalid. Too many procedures named foo.
B. Package specification is invalid. First procedure should be called called foo_1
C. Package specification is valid. We can have an unlimited number of procedures
name foo.
D. Package specification is valid. This is an example of overloading.
E. Package specification is invalid. We can only have one procedure named foo in
the package.

8. Select the best answer to complete this variable declaration for a column
value.DECLARE l_foo_column_id SOME_TABLE.SOME_COLUMN_________;BEGIN...
A. %ID
B. %ROWTYPE
C. %COLUMNTYPE
D. %TYPE
E. None of the above.

10. Select the best answer. This is an example of what _____ type of cursor?
DECLARE l_date DATE;BEGIN SELECT TRUNC(SYSDATE) INTO l_date FROM
DUAL;END;
A. Explicit
B. Implicit
C. REF CURSOR
D. PL/SQL
E. None of the above

18. Select the best answer describing the maximum number of times the COMMIT will
be executed.ExampleFOR i IN 1..1000 LOOP ... IF MOD(i
A. The commit is fired 1000 times
B. The commit is fired 100 times
C. The commit is fired 10 times
D. The commit is fired 1 time
E. None of the above.

28. What is the value of l_child_number?DECLARE l_parent_number NUMBER :=


1;BEGIN DECLARE l_child_number NUMBER := 2; BEGIN
l_child_number := l_parent_number + l_child_number; END;
DBMS_OUTPUT.PUT_LINE(TO_CHAR(l_child_number));EXCEPTION WHEN OTHERS THEN
l_child_number := 0; DBMS_OUTPUT.PUT_LINE(TO_CHAR(l_child_number);END;
A. 1
B. 2
C. 3
D. 0
E. None of the above.

What command is used to encrypt a PL/SQL application?

DB_ENCRYPT
DBMS_ENCRYPT
DBMS_WRAP
WRAP
2. All of the following can ONLY be used with numeric data types except:

AVG
COUNT
SUM
STDDEV

Which of the following is the fastest query method for a table?

Fetch by columnid

Fetch by rowid
Fetch by tableid
Fetch by indexid

Which of the following SQL operations demands the use of wild cards comparisons?

IN
BETWEEN
EXISTS
LIKE

Which of the following queries are legal?

"SELECT deptno, count(deptno) FROM emp GROUP BY ename;"


"SELECT deptno, count(deptno), job FROM emp GROUP BY deptno;"
"SELECT deptno, avg(sal) FROM emp;"
"SELECT deptno, avg(sal) FROM emp GROUP BY deptno;"

Name the tool for tuning SQL statements.

TUNEUP SYS
EXPLAIN SYS
DB_TUNEUP
EXPLAIN SYS

"Which of the following queries displays the sum of all employee salaries for those
employees not making commission, for each job, including only those sums greater
than 2500?"

"select job, sum(sal) from emp where sum(sal) > 2500 and comm is null;"
"select job, sum(sal) from emp where comm is null group by job having sum(sal) >
2500;"
"select job, sum(sal) from emp where sum(sal) > 2500 and comm is null group by
job;"
"select job, sum(sal) from emp group by job having sum(sal) > 2500 and comm is not
null;"

CORRECT IS B

Indicate whether this statement is true or false. A foreign key column must contain
unique values.

TRUE
FALSE
CORRECT IS B

What are the two ways to determine the structure of a table in database?
Using DESCRIBE command and dbms_metadata_get_commit package
Using METADATA command STRUCTURE commands
Using DATA_ON_DATA and STRUCTURE commands
Using DESCRIBE command and dbms_metadata_get_ddl package

CORRECT IS D

You might also like