PBD 2. Pertemuan 1

Download Report

Transcript PBD 2. Pertemuan 1

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
• 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?
A.
B.
C.
D.
SET
SET
SET
SET
ECHO ON
OUTPUT ON
FEEDBACK ON
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?
A. Issue the SHOW ERRORS command.
B. Issue the DISPLAY ERRORS command.
C. Query the FUNCTION_ERRORS data
dictionary view.
D. 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?
A. EXECUTE calc_comm;
B. SELECT * FROM calc_comm(emp);
C. EXECUTE calc_comm(SELECT total
FROM ord);
D. 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?
A.
B.
C.
D.
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?
A. REPLACE PROCEDURE
B. RECREATE PROCEDURE
C. UPDATE PROCEDURE WITH
D. CREATE OR REPLACE PROCEDURE