Which two statements about packages are true?
A. Both the specification and body are required components of a package
B. The package specification is optional, but the package body is required
C. The package specification is required, but the package body is optional
D. The specification and body of the package are stored together in the database
E. The specification and body of the package are stored separately in the database
查看答案
You have a row level BEFORE UPDATE trigger on the EMP table. This trigger contains a SELECT statement on the EMP table to ensure that the new salary value falls within the minimum and maximum salary for a given job title. What happens when you try to update a salary value in the EMP table?
A. The trigger fires successfully
B. The trigger fails because it needs to be a row level AFTER UPDATE trigger
C. The trigger fails because a SELECT statement on the table being updated is not allowed
D. The trigger fails because you cannot use the minimum and maximum functions in a BEFORE UPDATE trigger
Which part of a database trigger determines the number of times the trigger body executes?
A. trigger type
B. trigger body
C. trigger event
D. trigger timing
Given a function CALCTAX CREATE OR REPLACE FUNCTION calctax (sal NUMBER) RETURN NUMBER IS BEGIN RETURN (sal * 0.05); END; If you want to run the above function from the SQL*Plus prompt, which statement is true?
A. You need to execute the command CALCTAX(1000);.
B. You need to execute the command EXECUTE FUNCTION calctax;.
C. You need to create a SQL*Plus environment variable X and issue the command :X:= CALCTAX(1000);.
D. You need to create a SQL*Plus environment variable X and issue the command EXECUTE :X := CALCTAX;.
E. You need to create a SQL*Plus environment variable X and issue the command EXECUTE :X := CALCTAX(1000);
When a program executes a SELECT ... FOR UPDATE statement, Which of the following must it do?
A. Execute a COMMIT or ROLLBACK to end the transaction, even if no data has changed
B. Change the data values in the rows selected, then commit or rollback to end the transaction
C. Execute a COMMIT or ROLLBACK to end the transaction , but only if data has changed
D. Because a transaction doesn't start until data has actually changed, no COMMIT or ROLLBACK needs to executed