Font size
WorksheetsPL SQL
Total questions: 20
Worksheet time: 28mins
v_num is Null
v_num is NOT Null
compilation error
runtime error
v_num is not equal to v_char
compilation error
v_num is equal to v_char
runtime error
Which error occurs while the program is running and cannot be detected by the PL/SQL compiler?
Syntax error
Runtime error
Both A & B
None of the above
Which keyword is used instead of the assignment operator to initialize variables?
NOT NULL
DEFAULT
%TYPE
%ROWTYPE
Which statements execute a sequence of statements multiple times?
EXIT
LOOP
Both A & B
None of the above
Oracle predefined errors are NOT associated with specific error codes.
True
False
Which of the following returns the current error message text?
SQLERRM
SQLCODE
Both A & B
None of the above
Which datatypes are PL/SQL-only datatypes that are more efficient than the
SQL datatypes NUMBER or INTEGER for integer arithmetic?
PLS_INTEGER
NUMBER
Both A & B
None of the above
How many rows will be inserted And what will be the value
0,No value
99, 2 in all rows
1,2
99,2 to 99
PL/SQL has two types of subprograms, procedures and functions. Which subprogram is used to compute a value?
Procedure
Function
Both A & B
None of the above
________ does not correlate with an oracle error, instead, user_define
exceptions usually enforce business rules in situations
in which an oracle error would not necessarily occur
Predefined Exception
Internal Exception
User defined Exception
None of the above
Which choice shows what I will see on the screen after the following block is executed?
-1
VALUE_ERROR
-1
TOO_MANY_ROWS
3
NO ERROR
1
NO ERROR
For a user-defined exception, SQLCODE returns 1, and SQLERRM returns ___________.
“User-defined Exception”
1
0
d.
Which of the following is handled with the help of exception-handling section in an PL/SQL block.
For eg, SELECT INTO statement, which does not return any rows.
A runtime error
A syntax error
Both A & B
None of the above
To handle raised exceptions, you write separate routines called exception handlers.
Yes
No
I write the following block of code:
BEGIN
RAISE PROGRAM_ERROR;
EXCEPTION
##REPLACE##
END;
/
Which of the choices can be substituted in place of ##REPLACE## so that after
the resulting block is executed "PL/SQL is fantastic!" (without the double quotes)
will be displayed on the screen?
WHEN PROGRAM_ERROR
THEN
DBMS_OUTPUT.put_line ('PL/SQL is fantastic!');
WHEN PROGRAM_ERROR
THEN
DECLARE
l_fact VARCHAR2 (100) := 'PL/SQL is fantastic!';
BEGIN
DBMS_OUTPUT.put_line (l_fact);
END;
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('PL/SQL is fantastic!');
Non of the above
Which statement is correct regarding %typeb
a
b
c
d
True
False
a
b
c
Row deleted
No rows deleted
compilation error
None of the above
