Are you familiar with OCA and OCP? Would you like to try this quiz? OCA stands for Oracle Certified Associate, while OCP stands for Oracle Certification Program. OCA is a beginner’s exam, while OCP is the next step toward certification, and this exam is more in-depth when it comes to knowledge of technology. If you want to learn more about See moreOCA and OCP, this is the quiz for you.
Add_dept;
Add_dept('Accounting');
Add_dept(, 'New York');
Add_dept(p_location=>'New York');
Rate this question:
Packages can be nested.
You can pass parameters to packages.
A package is loaded into memory each time it is invoked
The contents of packages can be shared by many applications.
You can achieve information hiding by making package constructs private
Rate this question:
Cursor
Constant
Trigger
Sequence
View
Rate this question:
It persists across transactions within a session.
It persists from session to session for the same user.
It does not persist across transaction within a session
It persists from user to user when the package is invoked
It does not persist from session to session for the same user.
Rate this question:
ALTER TABLE emp ADD CONSTRAINT ck_sal CHECK (sal BETWEEN sal AND sal*1.1);
CREATE OR REPLACE TRIGGER check_sal BEFORE UPDATE OF sal ON emp FOR EACH ROW WHEN (new.sal < old.sal OR new.sal > old.sal * 1.1) BEGIN RAISE_APPLICATION_ERROR ( - 20508, 'Do not decrease salary not increase by more than 10%'); END;
CREATE OR REPLACE TRIGGER check_sal BEFORE UPDATE OF sal ON emp WHEN (new.sal < old.sal OR new.sal > old.sal * 1.1) BEGIN RAISE_APPLICATION_ERROR ( - 20508, 'Do not decrease salary not increase by more than 10%'); END;
CREATE OR REPLACE TRIGGER check_sal AFTER UPDATE OR sal ON emp WHEN (new.sal < old.sal OR -new.sal > old.sal * 1.1) BEGIN RAISE_APPLICATION_ERROR ( - 20508, 'Do not decrease salary not increase by more than 10%'); END;
Rate this question:
Use a drop procedure statement to drop a standalone procedure.
Use a drop procedure statement to drop a procedure that is part of a package. Then recompile the package specification.
Use a drop procedure statement to drop a procedure that is part of a package. Then recompile the package body
For faster removal and re-creation, do not use a drop procedure statement. Instead, recompile the procedure using the alter procedure statement with the REUSE SETTINGS clause.
Rate this question:
VALIDATE_PLAYER_STAT cannot recompile and must be recreated
VALIDATE_PLAYER_STAT is not invalidated
VALDIATE_PLAYER_STAT is invalidated
VALIDATE_PLAYER_STAT and BB_PACK are invalidated
Rate this question:
FOR EACH ROW trigger on the EMP table.
Statement-level trigger on the EMP table.
FOR EACH ROW trigger on the AUDIT_TABLE table.
Statement-level trigger on the AUDIT_TABLE table
FOR EACH ROW statement-level trigger on the EMP table.
Rate this question:
If errors occur during the compilation of a trigger, the trigger is still created.
If errors occur during the compilation of a trigger you can go into SQL *Plus and query the USER_TRIGGERS data dictionary view to see the compilation errors
If errors occur during the compilation of a trigger you can use the SHOW ERRORS command within iSQL *Plus to see the compilation errors
If errors occur during the compilation of a trigger you can go into SQL *Plus and query the USER_ERRORS data dictionary view to see compilation errors.
Rate this question:
USER_SOURCE
UTL_DEPTREE
USER_OBJECTS /DBA_DEPENDENT_OBJECTS
DEPTREE_TEMPTAB
USER_DEPENDENCIES
Rate this question:
You need to execute the command CALCTAX(1000);.
You need to execute the command EXECUTE FUNCTION calctax;.
You need to create a SQL *Plus environment variable X and issue the command :X := CALCTAX(1000);.
You need to create a SQL *Plus environment variable X and issue the command EXECUTE :X := CALCTAX;
You need to create a SQL *Plus environment variable X and issue the command EXECUTE :X := CALCTAX(1000);
Rate this question:
The rows are selected and ordered
The validity of the SQL statement is established
An area of memory is established to process the SQL statement.
The SQL statement is run and the number of rows processed is returned.
The area of memory established to process the SQL statement is released
Rate this question:
Trigger type
Trigger body
Trigger event
Trigger timing
Rate this question:
Employee 108 has his email name updated based on the return result of the function.
The statement fails because functions called from SQL expressions cannot perform DML.
The statement fails because the functions does not contain code to end the transaction.
The SQL statement executes successfully, because UPDATE and DELETE statements are ignoring in stored functions called from SQL expressions.
The SQL statement executes successfully and control is passed to the calling environment
Rate this question:
USER_PROCEDURES
USER_PROCS
USER_OBJECTS
USER_PLSQL_UNITS
Rate this question:
DML trigger
INSTEAD OF trigger
Application trigger
System event trigger
This is an invalid trigger
Rate this question:
The value of DISCOUNT_RATE always remains 0.00 in a session.
The value of DISCOUNT_RATE is set to 0.10 each time the package is invoked in a session.
The value of DISCOUNT_RATE is set to 1.00 each time the procedure DISPLAY_PRICE is invoked. 1z0-147
The value of DISCOUNT_RATE is set to 0.10 when the package is invoked for the first time in a session.
Rate this question:
1
10
None
A value equal to the number of rows in the EMP table
Rate this question:
Creating the table has no effect and procedure PROCESS_CUSTOMER still accesses data from public synonym CUSTOMER table.
If the structure of your CUSTOMER table is the same as the public synonym CUSTOMER table then the procedure PROCESS_CUSTOMER is invalidated and gives compilation errors. 1z0-147
If the structure of your CUSTOMER table is entirely different from the public synonym CUSTOMER table then the procedure PROCESS_CUSTOMER successfully recompiles and accesses your CUSTOMER table.
. If the structure of your CUSTOMER table is the same as the public synonym CUSTOMER table then the procedure PROCESS_CUSTOMER successfully recompiles when invoked and accesses your CUSTOMER table.
Rate this question:
Both the specification and body are required components of a package.
The package specification is optional, but the package body is required
The package specification is required, but the package body is optional.
The specification and body of the package are stored together in the database
The specification and body of the package are stored separately in the database.
Rate this question:
SHOW FUNCTION_ERROR
SHOW USER_ERRORS
SHOW ERRORS
. SHOW ALL_ERRORS
Rate this question:
A specific error or any errors occurs
A database is shut down or started up.
A specific user or any user logs on or off.
A user executes a CREATE or an ALTER table statement
A user executes a SELECT statement with an ORDER BY clause. /A user executes a JOIN statement that uses four or more tables.
Rate this question:
EXECUTE UPD_BAT_STAT(V_ID);
UPD_BAT_STAT(V_ID
RUN UPD_BAT_STAT(V_ID);
START UPD_BAT_STAT(V_ID);
Rate this question:
You use an application trigger to fire when a DELETE statement occurs
You use a database trigger to fire when an INSERT statement occurs
You use a system event trigger to fire when an UPDATE statement occurs.
You use INSTEAD OF trigger to fire when a SELECT statement occurs
Rate this question:
A stored procedure on the server
A block of code in a PL/SQL library.
A standalone procedure on the client machine
A block of code in the body of the program unit ORDERTOTAL
A local subprogram defined within the program unit ORDERTOTAL
Rate this question:
VARCHAR2
BOOLEAN
OUT
IN
Rate this question:
USER_PROC_DEPENDS
USER_DEPENDENCIES
USER_REFERENCES
USER_SOURCE
Rate this question:
A package.
A stored function.
A stored procedure
Another database trigger
Rate this question:
DROP TRIGGER business_hour;
DELETE TRIGGER business_hour;
REMOVE TRIGGER business_hour;
ALTER TRIGGER business_hour REMOVE;
DELETE FROM USER_TRIGGERS WHERE TRIGGER_NAME = 'BUSINESS_HOUR';
Rate this question:
EXECUTE INSERT_TEAM;
EXECUTE INSERT_TEAM(3, V_NAME=>'LONGHORNS', V_CITY=>'AUSTIN');
EXECUTE INSERT_TEAM(3, 'AUSTIN','LONGHORNS');
EXECUTE INSERT_TEAM (V_ID := V_NAME := 'LONGHORNS', V_CITY := 'AUSTIN');
EXECUTE INSERT_TEAM (3, 'LONGHORNS');
Rate this question:
Be stored only in the database.
Have both IN and OUT parameters.
Use the positional notation for parameters
Return a BOOLEAN or VARCHAR2 data type.
Rate this question:
A stored procedure is typically written in SQL
A stored procedure is a named PL/SQL block that can accept parameters.
A stored procedure is a type of PL/SQL subprogram that performs an action.
A stored procedure has three parts: the specification, the body, and the exception handler part
The executable section of a stored procedure contains statements that assigns values, control execution, and return values to the calling environment
Rate this question:
EXECUTE add_dept(p_loc=>2500)
EXECUTE add_dept('Education', 2500)
EXECUTE add_dept('2500', p_loc =>2500)
EXECUTE add_dept(p_name=>'Education', 2500)
EXECUTE add_dept(p_loc=>2500, p_name=>'Education')
Querying with the SELECT * notification.
Declaring variables with the %TYPE attribute
Specifying schema names when referencing objects
Declaring records by using the %ROWTYPE attribute.
Specifying package.procedure notation while executing procedures
The view associated with the trigger
The table associated with the trigger.
The event associated with the trigger.
The package associated with the trigger
The statement level or for each row association to the trigger.
CALC_TAX
INSERT_EMP
UPDATE_SAL
DELETE_EMP
UPDATE_EMP /MANAGE_EMPS
Use the DBMS_LOB.WRITE procedure to write data to a BFILE
Use the DBMS_LOB.BFILENAME function to locate an external BFILE.
Use the DBMS_LOB.FILEEXISTS function to find the location of a BFILE.
Use the DBMS_LOB.FILECLOSE procedure to close the file being accessed.
Rate this question:
V_PLAYER_AVG := .333;
BB_PACK.UPD_PLAYER_STAT.V_PLAYER_AVG := .333;
BB_PACK.V_PLAYER_AVG := .333;
This variable cannot be assigned a value from outside of the package.
G_comm has a value of 15 at 9:06am for Smith.
G_comm has a value of 15 at 9:06am for Jones
G_comm has a value of 20 at 9:06am for both Jones and Smith.
G_comm has a value of 15 at 9:03 am for both Jones and Smith
G_comm has a value of 10 at 9:06am for both Jones and Smith. /g_comm has a value of 10 at 9:03am for both Jones and Smith
DROP gen_email_name;
REMOVE gen_email_name;
DELETE gen_email_name;
DROP FUNCTION gen_email_name;
EXECUTE UPD_BAT_STAT;
EXECUTE UPD_BAT_STAT(V_AB=>10, V_ID=>31);
EXECUTE UPD_BAT_STAT(31, 'FOUR','TWO');
UPD_BAT_STAT(V_AB=>10, V_ID=>31);
RUN UPD_BAT_STAT
Rate this question:
The trigger records an audit trail when a user makes changes to the database.
The trigger marks the user as logged on to the database before an audit statement is issued.
The trigger invoked the procedure audit_action each time a user logs on to his/her schema and adds the username to the audit table.
The trigger invokes the procedure audit_action each time a user logs on to the database and adds the username to the audit table.
Rate this question:
DEPTREE
IDEPTREE
INDENT_TREE
I_DEPT_TREE
Rate this question:
Change the trigger type to a BEFORE DELETE
Take out the COUNT function because it is not allowed in a trigger
Remove the DBMS_OUTPUT statement because it is not allowed in a trigger.
Change the trigger to a statement-level trigger by removing FOR EACH ROW
Rate this question:
CREATE OR REPLACE FUNCTION tax_amt (p_id NUMBER) RETURN NUMBER
CREATE OR REPLACE PROCEDURE tax_amt (p_id NUMBER) RETURN NUMBER
. CREATE OR REPLACE PROCEDURE tax_amt (p_id NUMBER, p_amount OUT NUMBER)
CREATE OR REPLACE FUNCTION tax_amt (p_id NUMBER) RETURN NUMBER(10,2)
CREATE OR REPLACE PROCEDURE tax_amt (p_id NUMBER, p_amount OUT NUMBER(10, 2))
Rate this question:
The trigger fires successfully.
The trigger fails because it needs to be a row level AFTER UPDATE trigger.
The trigger fails because a SELECT statement on the table being updated is not allowed.
The trigger fails because you cannot use the minimum and maximum functions in a BEFORE UPDATE trigger.
Rate this question:
This statement creates a stored procedure named get_sal.
This statement returns a raise amount based on an employee id.
This statement creates a stored function named get_sal with a status of invalid
This statement creates a stored function named get_sal.
This statement fails.
Rate this question:
None of these commands; you cannot disable multiple triggers on a table in one command.
ALTER TRIGGERS ON TABLE employees DISABLE;
ALTER employees DISABLE ALL TRIGGERS;
ALTER TABLE employees DISABLE ALL TRIGGERS;
Rate this question:
Quiz Review Timeline (Updated): Mar 21, 2023 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.