We have sent an email with your new password.

Close this window

Easy Oracle Plsql Quiz

31 Questions  I  By Ibecruzin
EASY ORACLE PLSQL QUIZ
Oracle PL/SQL quiz

  
Changes are done, please start the quiz.


Question Excerpt

Removing question excerpt is a premium feature

Upgrade and get a lot more done!
1.  Select incorrect variable declarations
A.
B.
C.
D.
E.
2.  Supply the missing keywordDECLARE     CURSOR c1 IS          SELECT * FROM DUAL;     r1   c1%ROWTYPE;BEGIN      OPEN c1:            ______________ c1 INTO r1;                       IF c1%NOTFOUND THEN                 NULL;            END IF;      CLOSE c1;END;
3.  Select invalid variable types
A.
B.
C.
D.
E.
4.  List the correct sequence of commands to process a set of records when using explicit cursors
A.
B.
C.
D.
E.
5.  Supply the missing keywordDECLARE     CURSOR c1 IS          SELECT * FROM DUAL;     r1   c1%ROWTYPE;BEGIN      OPEN c1:            FETCH c1 INTO r1;                       IF c1%NOTFOUND THEN                 RAISE;            END IF;      ________________ c1;END;
6.  Select the best answerPROCEDURE foo ( p_foo_text  IN VARCHAR2,  p_foo_number IN OUT NUMBER ) ISp_foo_text and p_foo_number are referred to as this procedure's _________
A.
B.
C.
D.
E.
7.  Select the best answerPACKAGE foo_foo ISPROCEDURE foo( p_foo_text IN VARCHAR2 );PROCEDURE foo(p_foo_number IN NUMBER);END;
A.
B.
C.
D.
E.
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.
B.
C.
D.
E.
9.  Select the best answer to complete this variable declaration for a record.DECLARE   l_foo_table        SOME_TABLE_________;BEGIN...
A.
B.
C.
D.
E.
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.
B.
C.
D.
E.
11.  Select the best answer.  This is an example of what _____ type of cursor?DECLARE    l_date   DATE;    CURSOR c1 IS    SELECT TRUNC(SYSDATE)      FROM DUAL;BEGIN    OPEN c1;         FETCH c1 INTO l_date;    CLOSE c1;END;
A.
B.
C.
D.
E.
12.  Supply the missing key wordIF foo IS NULL _________   NULL;END IF;
13.  Enter the missing keywordIF foo = 1 THEN    l_text := 'A';______  foo = 2 THEN   l_text := 'B';ELSE    l_text := 'C';END IF;
A.
B.
C.
D.
E.
14.  Fill in the missing keyword.DECLARE    l_date    DATE;BEGIN  SELECT sysdate     ______ l_date     FROM dual;END;
15.  Describe the result set that will be obtained from this joinSELECT d.department_name, s.first_name, s.last_name, s.title, s.salary   FROM employee s,             department dWHERE s.salary > 20000     AND s.title = 'ANALYST'     AND ( d.department = 'FINANCE' OR             d.department = 'SALES' )              
A.
B.
C.
D.
E.
16.  Where do you declare an explicit cursor in the PL/SQL language?
A.
B.
C.
D.
E.
17.  Enter the missing keyword to make a new stored procedure.____________ PROCEDURE foo( p_foo_text  IN VARCHAR2 ) ASBEGIN    NULL;END;
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, 100) = 0 THEN      COMMIT;   END IF;   ...END LOOP;
A.
B.
C.
D.
E.
19.  Assuming the date and time is 09/09/2009 09:09:09, what value will the following statement returnSELECT TO_CHAR(TRUNC(SYSDATE),'MM/DD/YYYY HH24:MI:SS') FROM dual;
A.
B.
C.
D.
E.
20.  The || is is an example of what functionSELECT last_name || ', ' || first_name || ' ' || middle_nameFROM employees;
A.
B.
C.
D.
E.
21.  Which of the following is not an Oracle DML function?
A.
B.
C.
D.
E.
22.  Fill in the blank with the name of the function to convert a date to an alphanumeric stringSELECT _______(sysdate, 'MM/DD/YYYY') FROM dual;
23.  Select the invalid PL/SQL looping construct.
A.
B.
C.
D.
E.
24.  Select the best answer.  Which listed attribute is an invalid attribute of an Explicit cursor.
A.
B.
C.
D.
E.
25.  Which of the following is not a grouping function.
A.
B.
C.
D.
E.
26.  All the blanks can be filled with one word.  Fill in the blank Starting in Oracle 9i, you can use the _________ statement within a SQL statement. It has the functionality of an IF-THEN-ELSE statement. The syntax for the ________ statement is: __________  [ expression ]  WHEN condition_1 THEN result_1  WHEN condition_2 THEN result_2  ...  WHEN condition_n THEN result_n  ELSE resultEND
27.  Which of the following is not a valid Oracle PL/SQL exception.
A.
B.
C.
D.
E.
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.
B.
C.
D.
E.
29.  What command can you use to see the errors from a recently created view or stored procedure?
A.
B.
C.
D.
E.
30.  Select the best answer below.  What are the components of a package?
A.
B.
C.
D.
E.
31.  Write a function named date_as_mmyyyy which will accept a date as a parameter.  This date is then converted to characters and formatted as MMYYYY and then returned.   If this date is null then return sysdate in this format.
Back to top

Removing ad is a premium feature

Upgrade and get a lot more done!
Take Another Quiz