Presentation is loading. Please wait.

Presentation is loading. Please wait.

PL/SQL MULTIPLE CHOICE QUESTION.

Similar presentations


Presentation on theme: "PL/SQL MULTIPLE CHOICE QUESTION."— Presentation transcript:

1 PL/SQL MULTIPLE CHOICE QUESTION

2 Check your Knowledge Press to Start

3 1. Where can a BULK COLLECT clause are used?
SELECT INTO statement and FETCH statement RETURNING INTO clause and SELECT INTO statement FORALL statement and SELECT INTO statement SELECT INTO statement, RETURNING INTO statement and FETCH statement

4 2. Which of the following in incorrect regarding the FORALL statement?
FORALL sends DML statements from PL/SQL to SQL in batches rather than one at a time. FORALL tells the PL/SQL runtime engine to bulk bind into the SQL statement all the elements of one or more. collections before sending anything to the SQL engine FORALL statement is a FOR LOOPFORALL statement contains an iteration scheme

5 3. What does the lower bound and upper bound of FORALL statement indicate?
They are numbers implicitly assigned by the PL/SQL engine They must specify a valid range of consecutive index numbers for the variables referenced in the SQL statement. They must be constant numbers explicitly assigned They must specify a valid range of consecutive index numbers for the collection referenced in the SQL statement.

6 4. Which of the following is the correct syntax to use BULK COLLECT with SELECT INTO statement?
SELECT column_names BULK COLLECT INTO collection_type FROM table_name SELECT column_names INTO BULK COLLECT collection_type FROM table_name SELECT BULK column_names COLLECT INTO collection_type FROM table_name SELECT BULK COLLECT column_names INTO collection_type FROM table_name

7 5. Into which of the following type of variables do all BULK operations in PL/SQL fetch data?
Scalar Collection Records User defined types

8 6. An internal LOB is: A column that is a primary key A table
Stored in database A file stored outside of a database

9 7. You need to implements a virtual private database
7.You need to implements a virtual private database. In order to have the vpd functionality, a trigger is required to fire when every user initiate a session in the database. What type of trigger need to be created? DML triggers INSTEAD OF trigger System event trigger Application Trigger

10 8. The old and new qualifier can be used in which type of triggers?
Row Level DML triggers Row Level DML triggers Statement level DML triggers Row level application triggers

11 9. Which view displays indirect independencies, indenting each dependency?
DEPTREE IDEPTREE INDENT_TREE I_DEPT_TREE

12 10. Which two dopes the INSTEAD OF clause in a trigger identify
10. Which two dopes the INSTEAD OF clause in a trigger identify? 1) The view associated with the trigger 2) The event associated with trigger 3) The table associated with trigger 4) The package associated with trigger 1;2 2;4 1;3 3;4

13 11. Which three are valid ways to reduce the dependency failure
11. Which three are valid ways to reduce the dependency failure? 1) Querying with SELECT* notification 2) Specifying schema names when referencing object 3) Declaring records by using %ROWTYPE attribute 4) Declaring variable with % TYPE attribute 1;2;3 2;3;4 1;3;4 1;2;4

14 12. How can you migrate from a LONG to a LOB data type for a column?
Use the DBMS_MANAGE_LOB.MIGRATE procedure Use the UTL_MANAGE_LOB.MIGRATE procedure Use the DBMS_LOB.MIGRATE procedure Use the ALTER TABLE command

15 13. You need to remove database trigger REMOVE_HOUR which command do you use to remove the trigger in the SQL*plus environment? DROP_TRIGGER business_hour; DELETE_TRIGGER business_hour; REMOVE_TRIGGER business_hour; ALTER_TRIGGER business_hour REMOVE;

16 14. You are about to change the arguments of the CALC_TEAM_AVG function. Which dictionary view can you query to determine the name of the procedure of the function that invokes the CALC_TEAM_AVG function? USER_PROC_DEPENDS USER_REFERENCES USER_DEPENDENCIES USER SOURCE

17 15. You can create DML trigger for the timing information, which is valid with a DML trigger?
ON SHUTDOWN DURING INSTEAD BEFORE

18 16. You want to create a PL/SQL block of code that calculates the discount on customer’s orders. This code will invoke from several places, but only within a program unit ORDERTOTAL. What is the most appropriate location to store the code that calculates the discount? A stored procedure on the server A standalone procedure on client machine A block of code in PL/SQL library A local subprogram defined within the program unit ORDERTOTAL

19 17. Which statement about the trigger is true?
You use an application trigger to fire when a DELETE statement occur You use an database trigger to fire when a INSERT statement occur You use an event trigger to fire when a UPDATE statement occur You use an INSTEAD OF trigger to fire when a SELECT statement occur

20 18. Which four triggering events can cause a trigger to fire?
A specific error and an error occur A database is shutdown or on startup A specific user on any user log on or off Al of these

21 19. Which four triggering events can cause a trigger to fire?
A specific error and an error occur A database is shutdown or on startup A specific user on any user log on or off All of these

22 A value equal to the no of rows in the emp table
Examine the code: CREATE OR REPLACE TRIGGER update_emp AFTER UPDATE ON Emp BEGIN INSERT INTO audit_table(who, dated) VLAUES (USER, SYSDATE); END; You issue an UPDATE command in the emp table that result in change 10 rows How many rows are inserted into the AUDIT_TABLE? 1 10 None A value equal to the no of rows in the emp table

23 21. Which table should you query to determine when you procedure was last compiled?
USER_PROCEDURES USER_PROCS USER_OBJECTS USER_PLSQL_UNITS

24 22. Which part of the database trigger determines the number of time the trigger body executes?
Trigger type Trigger body Trigger event Trigger timing

25 23. Which statements are true
23. Which statements are true? (Choose all that apply) 1) If error occur during the compilation of a trigger, the trigger is still created 2) If error occur during the compilation of a trigger, use the SHOW ERROR command within ISQL *PLUS to see the compilation error 3) If error occur during the compilation of a trigger, you can go in the SQL*plus and query the USER ERROR PLUS to see the compilation error 4) If error occur during the compilation of a trigger, you can go in the SQL*plus and query the USER_TRIGGER data dictionary to the see the compilation errors 1;2;3 2;3;4 1;3;4 1;2;4

26 24. you need to create a trigger on the emp table that monitors every row that is changed and place this info into a table AUDIT_TABLE what type of trigger do you create ? FOR EACH ROW trigger on the emp table Statement-level trigger on the emp table FOR EACH ROW trigger on the AUDIT_TABLE Statement-level trigger on the AUDIT_TABLE

27 25. Which two statements describe the state of a package variable after executing the package in which it is described? It persist across transaction within a session It persist from session to session for the same user It does not persist within a table It persist from user to user when the package invoked

28 26. Which two programming construct used to group within a package
26. Which two programming construct used to group within a package? 1) Cursors 2) Constant 3) View 4) Trigger 1;2 1;3 2;3 3;4

29 27. The number of cascading trigger is limited by which database initialization parameter?
CASCADE_TRIGGER_CNT OPEN_CURSORS OPEN TRIGGERS OPEN_DB_TRIGGERS

30 Substitution variables
28. When creating stored procedure and functions which construct allow you to pass values to and from the calling environment? Local variables Arguments Boolean variables Substitution variables

31 29. You need to remove database trigger BUSINESS_RULE
29. You need to remove database trigger BUSINESS_RULE. Which command do you use to remove the trigger in SQL*PLUS environment? DROP TRIGGER business_rule; DELETE TRIGGER business_rule; REMOVE TRIGGER business_rule; ALTER TABLE business_rule;

32 30. Which two trigger are fused track object dependencies
30. Which two trigger are fused track object dependencies? 1) USER_DEPENDENCIES 2) IDEPTREE 3) USER_IDEPTREE 4) USER_DEPTREE 1;2 3;4 2;4 1;4

33 31. Which type of arguments pass a value from a calling environment?
VARCHAR2 BOOLEAN OUT IN

34 32. Which statement about the local dependant object is TRUE?
They are on different nodes They are on different databases They are on the same nodes in the same database They are on the same nodes in different database

35 33. Under which condition do you create a server side procedure?
When the procedure contains no SQL statements When the procedure contains no SQL procedure When procedure need to be used by many client application accessing several remote database When procedure need to be used by many users accessing the same schema objects on the local database

36 34. Which oracle supply package allows you to run jobs at user define times?
DBMS_JOB DBMS_RUN DBMS_PIPE DBMS_SQL

37 35. You need to drop a table within a store procedure
35. You need to drop a table within a store procedure. How do you implement this? You cannot drop a procedure from a stored procedure Use the DROP command Use the DBMS_DDL packaged routines Use the DBMS_DROP package routines

38 36. Which kind of package variable is V_MAX_TEAM_SALARY?
Private Public In Out

39 37. You want to send a message to another session connected to same instance. Which oracle supplied package did you use? DBMS_PIPE DBMS_JOB DBMS_OUTPUT DBMS_MESSAGE

40 38. Which system of privileges must you have to manually compile a stored procedure owned by another application developer? ALTER PROCEDURE ALTER ANY PROCEDURE ALTER ALL PROCEDURE COMPILE ANY PRO CEDURE

41 Executable and exception handling
39. When creating a function in which section will, you typically find a return keyword? Header only Declarative Executable and header Executable and exception handling

42 40. Which compiler directive to check the purity level of functions?
PRAGMA_SECURITY_LEVEL PRAGMA_SECURITY_REUSABLE PRAGMA_RESTRICT_PREFERENCES PRAGMA_RESTRICT_PURITY_LEVEL

43 41. How many public procedure are there in the MANAGE_EMPS package?
2 3 4

44 42. What happens during the parse phrase with dynamic SQL?
Rows are selected and ordered The numbers of rows proceed is returned The validity of the SQL statement is established An area d memory is established to process the SQL statement

45 43. Which script file must be executed before you can determine indirect independencies using the DEPTREE and INDEPTREE VIEWES? UTL_IDEPT.SQL UTLIDD.SQL UTLIDD.SQL UTLDTREE.SQL

46 44. Which two statements are true
44. Which two statements are true? 1) A function must return a value 2) A procedure must returns a value 3) A function execute PL/SQL statement 4) A function is invoked as a part of an expression 1;2 3;4 2;4 1;4

47 45. Which of the following statements are true about the LOB?
LOB is a database object LOB represents a datatype that is used to store large, unstructured data. LOB can be store inside or out of a database Internal LOB is a category of LOB

48 46. Which of the following ORACLE supplied package is used to enable HTTP callouts from PL/SQL and SQL to access the data on the internet? DBMS_DDL UTL_HTTP UTL_SMTP UTL_URL

49 47. If there is any chance applied to a package specification or body of a stored subprogram which statement is true about it? Package specification only requires recompilation Package body only requires recompilation Both package and body requires recompilation Both package and body does not requires recompilation

50 48. All objects placed in a package specification are called
Public objects. Private objects. None of the above. Both of the above.

51 49. The collection method LAST
Returns the last (largest) index numbers in a collection that uses integer subscripts. Returns the number of elements that a collection currently contains. Checks the Maximum Size of a Collection. None of the above.

52 50. Which of the following is not true about object oriented PL/SQL?
It helps in designing object-oriented database in Oracle. An object type allows you to crate composite types. Objects are created using the CREATE [OR REPLACE] CLASS statement. None of the above.

53 The Results


Download ppt "PL/SQL MULTIPLE CHOICE QUESTION."

Similar presentations


Ads by Google