Subscribe:Posts Comments | Read Articles on Various Topics - Pro Articles

You Are Here: Home » Oracle, Oracle Test Papers, Sample Placement Papers, SQL, Technical Interview Questions » Oracle PL & SQL Objective type questions

Oracle IT Company PL / SQL technical Multiple choice questions paper

Which is the true statement about implicit cursors?
a. Implicit cursors are used for SQL statements that are not named.
b. Developers should use implicit cursors with great care.
c. Implicit cursors are used in cursor for loops to handle data processing.
d. Implicit cursors are no longer a feature in Oracle.

Not a feature of a cursor FOR loop?
a. Record type declaration.
b. Opening and parsing of SQL statements.
c. Fetches records from cursor.
d. Exit condition has to be defined.

You have to use referential datatype declaration on a variable. The variable name is EMPLOYEE_LASTNAME, and the corresponding table and column is EMPLOYEE, and LNAME, respectively. How will you define this variable using referential datatypes?
a. Use employee.lname%type.
b. Use employee.lname%rowtype.
c. Look up datatype for EMPLOYEE column on LASTNAME table and use that.
d. Declare it to be type LONG.

Which three of the following are implicit cursor attributes?
a. %found
b. %too_many_rows
c. %notfound
d. %rowcount
e. %rowtype

If left out, which of the following would cause an infinite loop to occur in a simple loop?
a. LOOP
b. END LOOP
c. IF-THEN
d. EXIT

In which case will an error occur?
a. cursor action_cursor is
b. select name, rate, action
c. into action_record
d. from action_table;
e. There are no errors in this statement.

The command used to open a CURSOR FOR loop is
a. open
b. fetch
c. parse
d. None, cursor for loops handle cursor opening implicitly

What happens when rows are found using a FETCH statement
a. The cursor closes
b. The cursor opens
c. The current row values are loaded into variables
d. The variables hold the current row values

CREATE OR REPLACE PROCEDURE find_cpt (v_movie_id {ArgumentMode}NUMBER, v_cost_per_ticket {argument mode} NUMBER)IS
BEGIN
IF v_cost_per_ticket > 8.5 THEN
SELECT cost_per_ticket
INTO v_cost_per_ticket
FROM gross_receipt
WHERE movie_id = v_movie_id;
END IF;
END;
Which mode should be used for V_COST_PER_TICKET?
a. IN
b. OUT
c. RETURN
d. IN OUT

CREATE OR REPLACE TRIGGER update_show_gross {trigger information}
BEGIN
{additional code}
END;
The trigger code should only execute when the column, COST_PER_TICKET, is greater than $3.75. Which trigger information will you add?
a. WHEN (new.cost_per_ticket > 3.75)
b. WHEN (:new.cost_per_ticket > 3.75
c. WHERE (new.cost_per_ticket > 3.75)
d. WHERE (:new.cost_per_ticket > 3.75)

What is the maximum number of handlers processed before the PL/SQL block is exited when an
exception occurs?
a. Only one
b. All that apply
c. All referenced
d. None

For which trigger timing can you reference the NEW and OLD qualifiers?
a. Statement and Row
b. Statement only
c. Row only
d. Oracle Forms trigger

Below are some Oracle employment test complex problems and program questions:
CREATE OR REPLACE FUNCTION get_budget(v_studio_id IN NUMBER) RETURN number
ISv_yearly_budget NUMBER;
BEGIN
SELECT yearly_budget
INTO v_yearly_budget
FROM studio
WHERE id = v_studio_id;
RETURN v_yearly_budget;
END;
Which set of statements will successfully invoke this function within SQL*Plus?
a VARIABLE g_yearly_budget NUMBER EXECUTE g_yearly_budget := GET_BUDGET(11);
b. VARIABLE g_yearly_budget NUMBER EXECUTE :g_yearly_budget := GET_BUDGET(11);
c. VARIABLE :g_yearly_budget NUMBER EXECUTE :g_yearly_budget := GET_BUDGET(11);
d. VARIABLE g_yearly_budget NUMBER :g_yearly_budget := GET_BUDGET(11);

We have more free technical and written test objective type questions for Oracle and other MNCs papers. Download free.

CREATE OR REPLACE PROCEDURE update_theater (v_name IN VARCHAR2, v_theater_id IN NUMBER) IS
BEGIN
UPDATE theater
SET name = v_name
WHERE id = v_theater_id;
END update_theater;
When invoking this procedure, you encounter the error: ORA-00001: Unique constraint (SCOTT.THEATER_NAME_UK) violated.How should you modify the function to handle this error?
a. An user defined exception must be declared and associated with the error code and handled in the EXCEPTION
section.
b. Handle the error in EXCEPTION section by referencing the error code directly.
c. Handle the error in the EXCEPTION section by referencing the UNIQUE_ERROR predefined exception.
d. Check for success by checking the value of SQL%FOUND immediately after the UPDAT statement.

CREATE OR REPLACE PROCEDURE
calculate_budget IS v_budget studio.yearly_budget%TYPE;
BEGIN
v_budget := get_budget(11);
IF v_budget < yearly_budget =” v_new_budget” id =” v_studio_id;”>

See more oracle employment test problems and multiple choice questions and answers here free online here. See oracle and other software, IT services companies employment test , job placement papers and questions here free online. Free help for technical and hr interviews with the most commonly asked and popular, basic
questions, problems, programs for c, c++, sql and database languages. See Infosys, Wipro, HCL, satyam computers, ibm, microsoft, TCS, patni, mastek, intergraph, keane job placement papers and recruitment exam whole detailed test papers for freshers, developers, software programmers and web designers.
See latest and recent 2006, 2007 and 2008 january, february, march, april, may, june, july, august, september, october, november and december test question papers held at delhi, new delhi, mohali, jalandhar, chandigarh, panchkula, gurgaon, noida, mumbai, kolkata, ahmedabad, coimbatore, chennai, bangalore, orissa, hyderbad colleges and universities exam employment complete detailed test papers with solutions / answers. Keep watching LatestPapers for more free stuff. Good luck for your tests!

Leave a Reply

© Copyright 2010 Latestexams. All Rights Reserved | Privacy Policy | Terms & Conditions