90 likes | 235 Views
PBD 2. Pertemuan 1. Pengantar Oracle Developer Introduction to PL/SQL. Topik Diskusi. Apa yang dimaksud dengan Oracle Developer ? Apa perbedaan PL/SQL dan SQL. Pembahasan Soal. PBD 2. Pertemuan 1. Pembahasan Soal terakit dengan materi : Pengantar Oracle Developer
E N D
PBD 2. Pertemuan 1 Pengantar Oracle Developer Introduction to PL/SQL
TopikDiskusi • Apa yang dimaksud dengan Oracle Developer ? • Apa perbedaan PL/SQL dan SQL
PBD 2. Pertemuan 1 PembahasanSoalterakitdenganmateri: Pengantar Oracle Developer Introduction to PL/SQL Declaring PL/SQL
1. Which command must you issue in SQL*Plus to display the result of the DBMS_OUTPUT package? • SET ECHO ON • SET OUTPUT ON • SET FEEDBACK ON • SET SERVEROUTPUT ON
2. When creating a function in SQL*Plus, you receive an error message stating that the function created with compilation errors. What must you do to see the compilation errors? • Issue the SHOW ERRORS command. • Issue the DISPLAY ERRORS command. • Query the FUNCTION_ERRORS data dictionary view. • Do nothing. The errors will display after a five-second delay.
3. You have just created a PL/SQL user-defined function called CALC_COMM. Which statement will successfully test it? • EXECUTE calc_comm; • SELECT * FROM calc_comm(emp); • EXECUTE calc_comm(SELECT total FROM ord); • SELECT * FROM ord GROUP BY ordid HAVING calc_comm(total) > 5000;
4. You have just successfully dropped the CALC_COMM procedure and deleted the script file containing the source code. Which command can you execute to recover this procedure? • ROLLBACK; • ROLLBACK TO PROCEDURE calc_comm; • ALTER PROCEDURE calc_comm COMPILE; • Only the database administrator can recover this procedure using backups.
5. Examine this procedure: CREATE PROCEDURE add_theater IS BEGIN INSERT INTO theater VALUES (35, 'Riverplace Theatre', '1222 River Drive, Austin, Tx.'); END; This procedure already exists in the database. You have made a change to the code and want to recreate the procedure. Which command must you now use to prevent an error? • REPLACE PROCEDURE • RECREATE PROCEDURE • UPDATE PROCEDURE WITH • CREATE OR REPLACE PROCEDURE