1z0-144
Free trial
Verified
Question 1
View the Exhibit to examine the PL/SQL code:
DECLARE -
x NUMBER := 5;
y NUMBER := NULL;
BEGIN -
IF x != y THEN yields NULL, not TRUE
DBMS_OUTPUT.PUT_LINE(x != y); not run
ELSIF x = y THEN also yields NULL
DBMS_OUTPUT.PUT_LINE(x = y);
ELSE -
DBMS_OUTPUT.PUT_LINE -
(Cant tell if x and y are equal or not.);
END IF;
END;
/
SREVROUPUT is on for the session. Which statement is true about the output of the PL/SQL block?
- A: The output is x = y.
- B: It produces an error.
- C: The output is x != y.
- D: The output is Can't tell if x and y are equal or not.
Question 2
The STRING_TAB table has the following structure:
View the Exhibit and examine the code.
What is the outcome on execution?
- A: It displays Output buffer not long enough. This is my test string.-.
- B: It displays only Output buffer not long enough, and exits the anonymous block.
- C: It displays only This is my test string. - Because EXCEPTION should have been defined in the anonymous block to get the error message.
- D: It does not display any of the MEMS_PUTPUT messages and gives an error because a transaction control statement cannot be used in the exception section
Question 3
View the Exhibit and examine the structure of the AUDIR_CUST table.
Exhibit Missing -
CUST_ID and CUST_LIMIT are existing columns in the CUSTOMER table.
Examine the following trigger code:
Which statement is true about the above trigger?
- A: It gives an error on compilation because it should be a statement-level trigger.
- B: It compiles and fires successfully when the credit limit is updated in the customer table.
- C: It gives an error on compilation because of the commit command in the trigger code.
- D: It compiles successfully, but gives an error when the credit limit is updated in the CUSTOMER table because the PRAGMA AUTONOMOUS_TRANSACTION
Question 4
Which three statements are true about anonymous blocks and subprograms? (Choose three.)
- A: Only subprograms can be parameterized.
- B: Only subprograms are persistent database objects.
- C: Both anonymous blocks and subprograms can be parameterized.
- D: Both anonymous blocks and subprograms are persistent database objects.
- E: Only subprograms can return values that persist after the execution of the subprogram.
- F: Both anonymous blocks and subprograms can return values that persist in SQL*Plus variables after their execution.
Question 5
View the Exhibit and examine the partial data in the PRODUCTS table.
PROD_ID is the primary key.
Examine the following code:
What is the outcome on execution of the above code?
- A: It executes successfully.
- B: It gives an error because the DECODE function can be used only in a SQL statement.
- C: It gives an error because the SUBSTR and INSTR functions can be used only in a SQL statement.
- D: It gives an error because both the MAX and DECODE functions can be used only in a SQL statement.
Question 6
View Exhibit 1 and examine the structure of the EMP table.
View Exhibit 2 and examine the PL/SQL block of code.
What is the outcome?
- A: It gives an error because the return type is not valid.
- B: It gives an error because the record type is not defined within the function.
- C: It gives an error because the function call in DBMS_OUTPUT. PUT__LINE is not valid
- D: It executes successfully and displays the names and salaries of all employees who earn the highest salary.
- E: It executes successfully but does not display the names and salaries of all employees who earn the highest salary.
Question 7
View the Exhibit and examine the blocks of code that you plan to execute.
Which statement is true about the blocks of code?
- A: All the blocks execute successfully and the anonymous block displays cnt: 45 cnt: 45
- B: All the blocks execute successfully and the anonymous block displays cnt: 0 cnt: 1
- C: The anonymous block gives an error because the function invocation in line 2 is not valid.
- D: The procedure creation gives an error because the function invocation in line 1 is not valid.
Question 8
View the Exhibit and examine the structure of the EMP table.
Examine the following block of code:
Which stages are performed when the above block is executed? (Choose all that apply.)
- A: Bind
- B: Parse
- C: Fetch
- D: Execute
Question 9
The STRING_TAB table has the following structure:
View the Exhibit and examine the code.
What is the outcome on execution?
- A: It displays Output buffer not long enough. This is my test string.-.
- B: It displays only Output buffer not long enough, and exits the anonymous block.
- C: It displays only - Because EXCEPTION should have been defined in the anonymous block to get the error message. This is my test string.
- D: It does not display any of the DBMS_OUTPUT messages and gives an error because a transaction control statement cannot be used in the exception section
Question 10
View the Exhibit and examine the structure of the AUDIR_CUST table.
CUST_ID and CUST_LIMIT are existing columns in the CUSTOMER table.
Examine the following trigger code:
Which statement is true about the above trigger?
- A: It gives an error on compilation because it should be a statement-level trigger.
- B: It compiles and fires successfully when the credit limit is updated in the customer table.
- C: It gives an error on compilation because of the commit command in the trigger code.
- D: It compiles successfully, but gives an error when the credit limit is updated in the CUSTOMER table because the PRAGMA AUTONOMOUS_TRANSACTION
Question 11
Identify two situations where the DBMS_SQL package should be used. (Choose two.)
- A: The SELECT list is not known until run time.
- B: The dynamic SQL statement retrieves rows into records.
- C: You do not know how many columns a select statement will return, or what their data types will.
- D: You must use the % found SQL cursor attribute after issuing a dynamic SQL statement that is an insert or update statement.
Question 12
View the Exhibit to examine the PL/SQL code.
is on for the session.
SERVEROUTPUT -
Which statement is true about the execution of the code?
- A: The execution fails because of the misplaced else clause.
- B: The execution is successful even if there is no employee with EMPLOYEE_ID 115.
- C: The execution fails and throws exceptions if no employee with EMPLOYEE_ID 115 is found.
- D: The execution is successful, but it displays an incorrect output if no employee with EMPLOYEE_ID 115 is found.
Question 13
View the Exhibit and examine the structure of the departments table in SCOTTs schema.
Examine the following block of code:
The above procedure is created by user SCOTT. Another user JONES needs to use the procedure.
Which two statements are true in the above scenario? (Choose two.)
- A: JONES executes the procedure with definer's rights.
- B: JONES executes the procedure with invoker's rights.
- C: SCOTT should grant only the execute privilege for the procedure to JONES.
- D: SCOTT should grant both the execute privilege for the procedure and insert privilege for the table to JONES.
Question 14
View the Exhibit and examine the code.
Why does the code give an error on execution?
- A: because the WORD_LIST variable is not visible in procedure wording
- B: because the lexicon variable is not visible in procedure ADD_ENTRY
- C: because the lexicon variable is not initialized in procedure wording
- D: because the WORD_LIST parameter in out mode cannot be of a record data type
Question 15
View the Exhibit and examine the structure of the EMP table.
Which stages are performed when the above block is executed? (Choose all that apply)
- A: Bind
- B: Parse
- C: Fetch
- D: Execute
Question 16
View the Exhibit and examine the structure of the EMP table.
You want to create two procedures using the overloading feature to search for employee details based on either the employee name or employee number.
Which two rules should you apply to ensure that the overloading feature is used successfully? (Choose two.)
- A: The procedures can be either stand-alone or packaged.
- B: The procedures should be created only as packaged subprograms.
- C: The procedures should be created only as stand-alone subprograms.
- D: Each subprogram's formal parameters should differ in both name and data type.
- E: The formal parameters of each subprogram should differ in data type but can use the same names.
That’s the end of your free questions
You’ve reached the preview limit for 1z0-144Consider upgrading to gain full access!
Free preview mode
Enjoy the free questions and consider upgrading to gain full access!