Free Oracle 1Z0-151 Exam Actual Questions

The questions for 1Z0-151 were last updated On Nov 6, 2024

Question No. 1

Which type of variable must be declared before it is used in a trigger?

Show Answer Hide Answer
Correct Answer: A

PL/SQL is the language used in Forms triggers and program units.

PL/SQL lets you declare variables and constants, then use them in SQL and procedural statements anywhere an expression can be used. You must declare a constant or variable before referencing it in any other statements.

Variables can have any SQL datatype, such as CHAR, DATE, or NUMBER, or a PL/SQL-only datatype, such as BOOLEAN orPLS_INTEGER.

Note:

PL/SQL's data types correspond with SQL's column types, making it easy to interchange PL/SQL variables with data inside a table.


Question No. 2

You put some code in a Post_Update trigger and raise the FORM_TRIGGER_FAILURE under certain conditions. Does a rollback take place if the trigger falls?

Show Answer Hide Answer
Correct Answer: A

Question No. 3

Customers log in to your Orders application by using their customer ID, which is saved as a global variable. When the Orders form first comes up, you want it to be populated with the customer's orders, and you do not want customers to be able to query for another customer's orders.

You code the following triggers:

When-New Form instance on the Orders form:

GO_BLOCK('orders');

EXECUTE_QUERY;

You also have a button in the Control block labeled Query Orders with a When-Button Pressed trigger that has the same code as the When New-Form instance trigger.

To test the form, you run it and log in a Customer 104. When you click Query Orders, all orders are shown, not just those for Customer 104.

What is the best way to correct this issue to ensure that the customer can never query another customer's orders?

Show Answer Hide Answer
Correct Answer: B

Note: EXECUTE_QUERY procedure

Clears the current block, opens a query, and fetches anumber of selected records. If there are changes tocommit, Forms Builder prompts the operator to committhem before continuing EXECUTE-QUERYprocessing


Question No. 4

The Employees database table contains more columns than can be displayed at one time in a form. You create a data block that uses all the columns. How can you enable users to interact with all the items and switch between them without scrolling or closing anything?

Show Answer Hide Answer
Correct Answer: A

Question No. 5

You have a text item in your form named Object1. You want to create Object2 as an exact duplicate of Object1. You want to be able to change the properties of Object2. However if you change Object1, you do not want Object2 to change.

Which method of reusing Object1 would be best for these requirements?

Show Answer Hide Answer
Correct Answer: A