1-30
Which type of an exception below does not exist?
A) NO_CURSOR_FOUND
B) TOO_MANY_ROWS
C) INVALID_CURSOR
D) ZERO_DIVIDE
What is meaning of keyword SQLERRM?
A) a special type of exception
B) is used to retrieve the error message
C) returns the numeric value for the error code
D) wrong SQL statement
What is meaning of keyword SQLCODE?
A) returns the numeric value for the error code
B) is used to retrieve the error message
C) notifies that insert error occurs
D) wrong SQL statement
What type of procedure allows invoking user-defined exception?
A) EXCEPTION
B) PRAGMA EXCEPTION_INIT
C) SQLERRM
D) RAISE
What type of procedure is used to retrieve the error message?
A) EXCEPTION
B) PRAGMA EXCEPTION_INIT
C) SQLERRM
D) RAISE
What keyword shows the section of program which traps use-defined exceptions?
A) EXCEPTION
B) PRAGMA EXCEPTION_INIT
C) SQLERRM
D) RAISE
What type of function is used to associate the declared exception with the standard Oracle server error number?
A) EXCEPTION
B) PRAGMA EXCEPTION_INIT
C) SQLERRM
D) RAISE
What type of function is used to return the numeric value for the error code?
A) EXCEPTION
B) PRAGMA EXCEPTION_INIT
C) SQLERRM
D) SQLCODE
Which of the following is NOT an iteration statement supported by PL/SQL:
A) The FOR LOOP statement.
B) The LOOP UNTIL statement.
C) The WHILE LOOP statement.
D) None of the above.
104. Look at this PL/SQL block: DECLARE v_count NUMBER; BEGIN SELECT COUNT(*) INTO v_count FROM employees WHERE salary > 50000; END; No employees earn more than $50,000. Which of the following statements are true?
The SELECT will return value 0 into V_COUNT. (*)
The SELECT will fail because it does NOT return exactly one row.
The block will fail because variable V_SALARY was not declared.
The block will fail because no results are displayed to the user.
. Look at this PL/SQL block: DECLARE v_count NUMBER; BEGIN SELECT COUNT(*) INTO v_count FROM employees WHERE salary > 50000; END; No employees earn more than $50,000. Which of the following statements are true?
The SELECT will fail because it does NOT return exactly one row.
The block will fail because variable V_SALARY was not declared.
The block will fail because no results are displayed to the user.
The SELECT returns exactly one row.
Which one of these SQL statements can be directly included in a PL/SQL executable block?
IF... THEN...;
INSERT INTO...;
SELECT * FROM DUAL;
SHOW USER;
Which of the following is NOT a valid guideline for retrieving data in PL/SQL?
Terminate the SQL statement with a semicolon (;)
Do NOT use a WHERE clause in SELECT statements.
Where possible, declare variables using the %TYPE attribute.
Specify the same number of variables in the INTO clause as database columns in the SELECT clause.
When used in a PL/SQL block, which SQL statement must return exactly one row?
UPDATE
SELECT
MERGE
DELETE
112. Look at the following block: DECLARE v_date DATE := SYSDATE; BEGIN WHILE v_date < LAST_DAY(v_date) LOOP v_date := v_date + 1; END LOOP; DBMS_OUTPUT.PUT_LINE(v_date); END; If today's date is 17th April 2007, what will be displayed when this block executes?
01-MAY-07
31-DEC-07
4/30/2007
4/17/2007
Which statement best describes when a FOR loop should be used?
When an EXIT WHEN statement must be coded.
When an implicitly declared counter must increase by 1 in each iteration of the loop.
When we want to exit from the loop when a Boolean variable becomes FALSE.
When the statements inside the loop must execute at least once.
You should use a WHILE loop when the number of iterations of the loop is known in advance.
True
False
Look at this code fragment: FOR I IN 1 .. 3 LOOP I := 4; DBMS_OUTPUT.PUT_LINE('The counter is: ' || i); END LOOP; How many lines of output will be displayed?
One
Three
Four
The block will fail because you cannot change the value of I inside the loop.
You want a loop that counts backwards from 10 through 1. How do you code that?
FOR I IN 10 .. 1 LOOP
FOR I IN 1 .. 10 BY -1 LOOP
FOR I IN REVERSE 1 .. 10 LOOP
FOR I IN REVERSE 10 .. 1 LOOP
When declared using %TYPE, a variable will inherit from the column on which it is based.
The name of the column
The value of the column
The data type and size of the column
None of the above
Which of the following is NOT a character data type?
VARCHAR2
BOOLEAN
CHAR
LONG
120. Examine the following variable declarations: DECLARE v_number NUMBER := 10; v_result NUMBER; Which of the following correctly assigns the value 50 to V_RESULT?
V_result :
V_result :
V_result :
All of the above.
122. Which of the following is a composite data type?
CLOB
VARCHAR2
RECORD
DATE
121. A function called FORMAT_TODAYS_DATE accepts no parameters and returns today's date in the format: Month DD, YYYY. The following anonymous block invokes the function: DECLARE v_today DATE; BEGIN -- invoke the function here Which of the following statements correctly assigns the date variable v_today to the value returned by the format_todays_date function?
Format_todays_date :v_today('Month DD, YYYY');
V_today :format_todays_date ('Month DD, YYYY');
V_today :format_todays_date(v_today);
V_today :TO_DATE(format_todays_date, 'Month DD, YYYY');
123. Which of the following are PL/SQL data types?
Large Objects (LOB)
Lexical
Vector
Delimiter
26. 124. Which of the following are PL/SQL data types? Index-by tables are often used:
Search thru very large databases
Is a new feature of Oracle 9i
To cache table values to give a performance boost in special situations, especially where frequent lookup is called for.
None of the above.
A PL/SQL block must consist of the following three sections. An Executable section starts with:
BEGIN
DECLARE
EXCEPTION
None of the above
Which one is the wrong answer? The %TYPE attribute:
Is used to declare a variable according to a database column definition
Is used to declare a variable according to a collection of columns in a database table or view
Is used to declare a variable according the definition of another declared variable
Is prefixed with the database table and column names or the name of the declared variable
) You can use most SQL single-row functions such as number, character, conversion, and date single-row functions in PL/SQL expressions.
True
False
4) When using the SELECT statement in PL/SQL, the INTO clause is required and queries can return one or more row.
True
False
{"name":"1-30", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Which type of an exception below does not exist?, What is meaning of keyword SQLERRM?, What is meaning of keyword SQLCODE?","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}
More Quizzes
DUA
8447
Grade 10. Unit 7. Services. Means of payment
13626
Thetford Town Quiz
105211
Α‘ααα£α¨αα α«αααα‘ ααα«α ααααα‘ α‘α’αα’αα‘α’ααα
1050
The best soccer player in the world
320
Ψ΄Ψ±ΩΨ© Ω
ΩΨ§ΩΨΨ© ΨΨ΄Ψ±Ψ§Ψͺ
100
What is your Master Builder level?
520
The Lovely Bones
740
Klj
100
Code.org SΔ±nav
100
World
420
100