Updating salary for different departments using cursor
Declare a variable e_null_excep of type EXCEPTION, associate it with ORA-01400 using a PRAGMA directive, and test for WHEN e_null_excep in the exception section.
Allow exceptions to propagate back to the calling environment. (*) It must be the same type as the matching OUT parameter. Retrieve the saved code from "Saved SQL" in SQL Commands B. Which of the following is NOT correct coding for a procedure parameter?WRITE(v_locator) WHERE candidate_id = 100; END; DECLARE v_lobloc CLOB; BEGIN SELECT resume INTO v_lobloc FROM job_applicants WHERE applicant_id = 100; DBMS_LOB. A single procedure can be both a referenced object and a dependent object. WRITE(v_lobloc,14,21,'for five years'); END;(*) 48. Package ED_PACK has declared a record type named ED_TYPE in the package specification. Variables of datatype ED_TYPE can be declared only within ED_PACK, not in separate subprograms or anonymous blocks. BFILEs are stored outside the database and can be queried and updated by using procedures in DBMS_LOB. when I updated a record in my form check my screenshot: and clicked save button the result was: as you can see in the message at the bottom, it has 18 records. And also the grades that I input didn't display all.This is my code in when-new-block-instance trigger: DECLARE CURSOR studgrade_cur IS SELECT e.student_id, s.subject_code --, g.grade [code]...The package contains three public procedures: OPENPROC opens the cursor; FETCHPROC fetches 5 rows from the cursor's active set; CLOSEPROC closes the cursor. Which of the following will display the detailed code of the subprograms in package DEPTPACK in your schema ? Which of the following SQL statements can be included in a PL/SQL block only by using Dynamic SQL? Examine the following code: CREATE TRIGGER emp_trigg AFTER UPDATE OF salary ON employees FOR EACH ROW DECLARE v_count NUMBER; BEGIN -- Line A END; Which of the following statements is NOT allowed at Line A? Which dictionary view shows the detailed code of a trigger body?
What will happen when a user session executes the following commands in the order shown? (1) Points SELECT text FROM USER_SOURCE WHERE name = 'DEPTPACK' AND type = 'PACKAGE' ORDER BY line; SELECT text FROM USER_SOURCE WHERE name = 'DEPTPACK' AND type = 'PACKAGE BODY' ORDER BY line; (*) SELECT text FROM USER_SOURCE WHERE object_name = 'DEPTPACK' AND object_type = 'PACKAGE BODY' ORDER BY line; SELECT text FROM USER_SOURCE WHERE name = 'DEPTPACK' AND type = 'BODY' ORDER BY line; 38. You can see which parameters MYPROC uses by executing: DESCRIBE mypack.myproc. (Choose two.) (1) Points (Choose all correct answers) DELETE SAVEPOINT ALTER (*) SELECT ..... The UTL_FILE package can be used to create binary files such as JPEGs as well as text files. (1) Points SELECT count(*) INTO v_count FROM departments; UPDATE employees SET job_id = 'IT_PROG' WHERE employee_id = : OLD.employee_id; SELECT count(*) INTO v_count FROM employees; (*) DBMS_OUTPUT. (1) Points USER_SOURCE USER_TRIGGERS (*) USER_OBJECTS USER_DML_TRIGGERS USER_SUBPROGRAMS 44. Examine the following code: CREATE TRIGGER emp_trigg -- Line A BEGIN INSERT INTO log_table VALUES (USER, SYSDATE); END; Which of the following can NOT be coded at Line A?
PUT_LINE(v_emp_rec.salary); END LOOP; END; CLOSE emp_curs; END; (1) Points The code will fail because you cannot declare a cursor in an inner block.
The code will fail because the cursor is declared in the inner block but is referenced in the outer block.
BEGIN DELETE FROM employees WHERE department_id=77; DBMS_OUTPUT. (*) An exception is raised because the block does not contain a COMMIT statement. (1) Points %ISOPEN (*) %NOTFOUND %FOUND %ROWCOUNT 22. DECLARE CURSOR emp_curs(p_dept_id NUMBER) IS SELECT * FROM employees WHERE department_id = p_dept_id; BEGIN FOR dept_rec IN (SELECT * FROM departments) LOOP DBMS_OUTPUT.
What will happen when the following block is executed? Which of the following cursor attributes evaluates to TRUE if the cursor is open?
CREATE OR REPLACE PROCEDURE myproca AUTHID OWNER IS... You want to remove the procedure NO_NEED from your schema.