Pl/SQL LANGUAGE MULITPLE CHOICE QUESTION SET-3
1. PL/SQL stands for --------. Procedural language Procedural Language extension of SQL Programming language extension of SQL None of these www.prolearninghub.com
2. The declaration section of PL/SQL block is start with reserved keyword -------. DECLARE NEW CLASS BLOCK www.prolearninghub.com
3. DDL stands for ------. Data decomposition language Data definition language Data declaration language Domain definition language www.prolearninghub.com
4. Which of the following statement is correct about PL/SQL. It consists block of codes consists of procedural language constructs PL/SQL handles errors or exceptions effectively All are true www.prolearninghub.com
5. We can declare data type of a field ----- n the same way as you declare the fields while creating the table col_name table_name.column_name%type; We can use both A and B None of these www.prolearninghub.com
6. ------ is a SYSTEM.EFFECTIVE.DATE variable. Read only Write only Both read and write only None of the mentioned www.prolearninghub.com
7. The IN operator tests ---------. whether a value lies in a specified range set membership compares a character, string, or CLOB None of these www.prolearninghub.com
8. PL/SQL loop can be labeled by ------ Single angle brackets Double angle brackets Curly brackets Round brackets www.prolearninghub.com
9. What command can we type to call a report from FORM. Run_Product built_in Call_Product_Default Run_Product_Default None of these www.prolearninghub.com
Collection of system libraries 10. A subprogram is a -----. Few lines program A child of a program Collection of system libraries None of these www.prolearninghub.com
11. It you want to restrict a procedure you’ll use ------property. GET_BLOCK RESTRICT_BLOCK STOP_BLOCK END_BLOCK www.prolearninghub.com
12. A library file is save with ----- extension. .pl .sql .plsql .pll www.prolearninghub.com
13. ASCII(x); function returns --------. Character with the ASCII value of x ASCII value of the character x Convert the ASCII character into binary Converts the binary character into ASCII www.prolearninghub.com
14. INITCAP(x); function --------. Convert the initial letter of string to upper case and return true Convert the initial letter of each word to upper case and return true Convert the initial letter of each word to upper case and return string Convert the initial letter of each word to upper case and return array www.prolearninghub.com
15. INSTR() find a string and return its position and has ----- number of parameters. 2 3 4 5 www.prolearninghub.com
16. INSTRB(x); return the location of string in ------. Binary Boolean Bytes None of these www.prolearninghub.com
17. TO find the number of character in a string ------function will be helpful. LENGTHB(); LENGTH(); SIZE(); STRCHAR(); www.prolearninghub.com
18. PL/SQL programming language provides a data structure called the ------. ARRAY VARRAY STACK POINTER www.prolearninghub.com
19. The basic syntax for creating a varray is --------. CREATE TYPE varray_type_name IS VARRAY(n) of <element_type > REPLACE TYPE varray_type_name IS VARRAY(n) of <element_type > CREATE OR REPLACE TYPE varray_type_name IS VARRAY(n) of <element_type > CREATE OR REPLACE TYPE varray_type_name IS VARRAY(n) www.prolearninghub.com
20. A subprogram created inside a package is -------. packaged subprogram standalone subprogram Procedure Function www.prolearninghub.com
21. ------ keyword is used to create a standalone procedure. IN Can be anyone of them www.prolearninghub.com
22. Standalone procedure can be called -------. Using the execute keyword Calling the name of the procedure from a PL/SQL block Using the run keyword Both A and B www.prolearninghub.com
23. The OUT parameter in a subprogram is passed by -------. Value Reference Object None of these www.prolearninghub.com
24. Actual parameters could be passed by -----. Positional notation Named notation Mixed notation All of these www.prolearninghub.com
Object passing notation 25. the following declaration represent which notation of parameter passing. findMin(x=>a, y=>b, z=>c, m=>d); Positional notation Named notation Mixed notation Object passing notation www.prolearninghub.com
26. Which of the following call is illegal. findMin(a, b, c, m=>d); findMin(x=>a, b, c, d); findMin(a, b, c, d); All are legal www.prolearninghub.com
27. Oracle creates a memory area, known as ------, for processing an SQL statement Execution area Block area Code area Context area www.prolearninghub.com
28. A ------ is a pointer to context area. Cursor Array Memory Block www.prolearninghub.com
29. A cursor that is automatically created by Oracle whenever an SQL statement is executed is called as -------. Implicit cursor Explicit cursor Random cursor Allocated cursor www.prolearninghub.com
30. %FOUND attribute of a cursor returns ------. Returns TRUE if an INSERT, UPDATE, or DELETE statement affected one or more rows Return true if a SELECT INTO statement returned one or more rows Both A and B Always return FALSE www.prolearninghub.com
Always return true because ORACLE never close sql cursor 31. %ISOPEN -------- Always returns false Always return true because ORACLE never close sql cursor Open implicit cursor Both A and B www.prolearninghub.com
32. The syntax for creating an explicit cursor is ---------. CURSOR cursor_name IS select_statement; CURSOR cursor_name IS update_statement; cursor_name IS select_statement; CURSOR cursor_name select_statement; www.prolearninghub.com
33. Write the query for fetching the cursor involving access one row at a time. SEELCT x_customers INTO x_id, x_name, x_address; FETCH x_customers , x_id, x_name, x_address; FETCH x_customers INTO x_id, x_name, x_address; None of the these is correct www.prolearninghub.com
34. PL/SQL can handle the ------ records. Table-based Cursor based User defined All of these www.prolearninghub.com
35. The %ROWTYPE attribute creates the -------. Table based records Cursor based records User defined records Both A and B www.prolearninghub.com
36. How many types of exception are there in PL/SQL. 2 3 4 5 www.prolearninghub.com
37. RAISE command is used to -------. Handle a exception Create an exception To remove a exception To do all of above www.prolearninghub.com
38. Syntax for defining a exception is ------. DECLARE my-exception; DECLARE my-exception EXCEPTION; DECLARE user-Defined EXCEPTION; None of these www.prolearninghub.com
39. ACCESS_INTO_NULL generates ------ oracle error. 06592 06531 00001 06530 www.prolearninghub.com
40. INVALID_NUMBER exception raised when ---------. attempts are made to make a cursor operation that is not allowed the conversion of a character string into a number fails when s program attempts to log on to the database with an invalid username It is raised when a SELECT INTO statement returns no rows www.prolearninghub.com
41. What exception raised when a database call is issued without being connected to the database. NOT_LOGGED_ON LOGIN_DENIED NO_DATA_FOUND PROGRAM_ERROR www.prolearninghub.com
42. What exception occurs when PL/SQL ran out of memory or memory was corrupted. STORAGE_ERROR LOW_MEMORY RUNOUT_MEMORY CORRUPT_MEMORY www.prolearninghub.com
43. What oracle error TOO_MANY_ROWS generates . 06500 06502 30625 01422 www.prolearninghub.com
44. -------- are stored programs, which are automatically executed or fired when some events occur. Cursors Triggers Procedures Packages www.prolearninghub.com
45. Identify the false statement about triggers. They Enforce referential integrity Generating some derived column values automatically Allows invalid transactions also Synchronous replication of tables www.prolearninghub.com
46. A package consist of ----- Package specification Package body Package declaration Both A and B www.prolearninghub.com
47. A ------ is an ordered group of elements having the same data type. Package Library procedure Collection www.prolearninghub.com
48. PL/SQL provide ------ type of collection. 2 3 4 5 www.prolearninghub.com
49. An ---------- (also called an associative array) is a set of key-value pairs. Nested table Index-by tables Variable size array varray www.prolearninghub.com
50. Syntax for nested table is -----. TYPE type_name IS TABLE OF element_type [NOT NULL]; table_name type_name; TYPE type_name IS TABLE OF element_type [NOT NULL]; TYPE type_name IS TABLE OF element_type [NOT NULL]; None of these www.prolearninghub.com