Oracle PL/SQL 9i Test
__________ is present in Oralce9i only.
A CALL statement inside the trigger body enables you to call:
A function CALTAX is given below: CREATE OR REPLACE FUNCTION caltax (sal NUMBER) RETURN NUMBER IS BEGIN RETURN (sal * 0.05); END CALTAX; Which of the following statements is correct in case you wan...
All the packages can be recompiled by using an Oracle utility called:
An internal LOB is _____.
Consider the following code: declare v_id number(3):=50; V_message(30):='Product 10012'; begin declare v_id number(3):=40; V_message(30):='welcome to world'...
CREATE OR REPLACE PACKAGE manage_emp IS tax_rate CONSTANT NUMBER(5,2) := .28; v_id NUMBER; PROCEDURE insert_emp (p_deptno NUMBER, p_sal NUMBER); PROCEDURE delete_emp; PROCEDURE update_emp; FUNCTION...
Database triggers are designed:
Examine the Block given below: declare v_no number:=2; v_msg varchar2(20):='Goodbye'; begin case When v_no=1 then ��������dbms_output.put_line('One!'); ��������dbms_output.put_line('Another One!')...
Examine the code given below: CREATE OR REPLACE FUNCTION gen_email (first_name VARCHAR2, last_name VARCHAR2, id NUMBER) RETURN VARCHAR2 IS email_name VARCHAR2(19); BEGIN email_name := SUBSTR(first...
Examine the code given below: CREATE OR REPLACE PACKAGE comm_package IS g_comm NUMBER := 10; PROCEDURE reset_comm(g_comm IN NUMBER); END comm_package; User Jones executes the following code at 9:0...
Examine the code given below: CREATE OR REPLACE TRIGGER secure_emp BEFORE LOGON ON employees BEGIN IF (TO_CHAR(SYSDATE, 'DY') IN ('SAT', 'SUN')) OR (TO_CHAR(SYSDATE, 'HH24:MI') NOT BETWEEN '08:00' ...
Examine the code given below: CREATE OR REPLACE TRIGGER update_emp AFTER UPDATE ON emp BEGIN INSERT INTO audit_table (who, dated) VALUES (USER, SYSDATE); END; / You issue an UPDATE command in the E...
Examine the code given below: Declare cursor emps is select Empno,ename,sal,deptno,job from emp; begin for rec in emps loop open emps; dbms_output.put_line(rec.empno||rec.ename||rec.sal||rec.deptno...
Examine the following code: CREATE OR REPLACE PROCEDURE add_dept ( p_name dept.dname%TYPE DEFAULT 'unknown', p_loc dept.locE DEFAULT 1700) IS BEGIN INSERT INTO dept VALUES (dept_seq.NEXTVAL,p_name,...
Examine the following code: CREATE OR REPLACE PROCEDURE add_dept ( p_name dept.dname%TYPE DEFAULT 'unknown', p_loc dept.locE%TYPE DEFAULT 1700) IS BEGIN INSERT INTO dept VALUES (dept_seq.NEXTVAL,p_...
Examine the following function: CREATE OR REPLACE FUNCTION PLAYER_AVG (V_ID in PLAYER.PLAYER_ID%TYPE) RETURN NUMBER IS V_AVG NUMBER; BEGIN SELECT HITS INTO V_AVG FROM PLAYER WHERE PLAYER_ID = V_ID;...
Examine the package given below: CREATE OR REPLACE PACKAGE discounts IS g_id NUMBER := 7829; discount_rate NUMBER := 0.00; PROCEDURE display_price (p_price NUMBER); END discounts; / CREATE OR REPL...
How can you migrate from a LONG to a LOB data type for a column?
In Explicit lock, two database operations wait for each other to release a lock.
SQL%ISOPEN always evaluates to false in case of:
The OLD and NEW qualifiers can be used in Row level system trigger.
The oracle server implicitly opens a cursor to process:
The process of Breaking Sql sentence into words and then checking them for syntax and object privileges is called:
The Technique employed by the Oracle engine to protect table data when several people are accessing is called:
When the procedure or function is invoked, Oracle engine loads the compiled procedure or function in the memory area called:
Which cursor allows passing values dynamically to a cursor?
Which cursor attribute returns the number of rows fetched from the active set in the case of an explicit cursor?
Which lock is used in Pl/Sql if the where clause evaluates to a set of data?
Which of the following commands is used to disable all the triggers on an EMP table?
Which of the following commands is used to disable all the triggers on the EMPLOYEES table?
Which of the following exceptions is raised when the data type or data size is invalid?
Which of the following is not a legal declaration?
Which of the following program declarations are correct for a stored program unit?
Which of the following statements are correct with regard to packages?
Which of the following statements is correct with regard to stored procedures?
Which of the following statements is correct?
Which of the following Triggers is fired each time a row in the table is affected by the triggering statement?
Which of the following types of argument passes a value from a procedure to the calling environment?
Which part of a database trigger determines the number of times a trigger body executes?
Which procedure is called after a row has been fetched to transfer the value from the select list of the cursor to a local variable?
Which table should be queried to determine when a procedure was last compiled?
Which two programming constructs can be grouped within a package?
You need to create a trigger on the EMP table, which monitors every row that is changed and places this information in the AUDIT_TABLE. What type of trigger would you create?
You need to drop a table from within a stored procedure. How would you do this?