Go Back   StudyChaCha 2024 2025 > StudyChaCha Discussion Forum > General Topics

  #2  
Old January 3rd, 2014, 11:24 AM
Super Moderator
 
Join Date: Jun 2013
Default Re: Oracle Recent placement papers

Yes sure, here I am uploading a document file having the Oracle- placement papers. There are objective types of the questions available of Aptitude, English, technical subjects with the answers. This is the content of attachment:

Pick out the most effective word(s) from the given words to fill in the blank to make the sentence meaningfully complete

1) Rohan and Rohit are twin brothers, but they do not look ......

A.unique B.different

C.likely D.alike

Ans.D


2) ...... of old paintings is a job for experts.

A.Resurrection B.Retrieval

C.Restoration D.Resumption

Ans.C


3) He is a person of sound character and ...... disposition.

A.beneficent B.morous

C.amiable D.amicable

Ans.C


4) In high school many of us never realised the importance that grammar would ...... in later life.

A.figure B.portray

C.play D.exercise

Ans.C


5) On account of the dearth of grass on the arid plains the cattle became ......

A.flippant B.jubilant

C.agitated D.emaciated

Ans.D


Each question consist of two words which have a certain relationship to each other followed by four pairs of related words, Select the pair which has the same relationship.


6) LIGHT:BLIND

A.speech:dumb B.language:deaf

C.tongue:sound D.voice:vibration

Ans.A


7) CORPOREAL:SPIRITUAL

A.mesalateau B.moron:savant

C.foreigner:immigrant D.pedagogue:teacher

Ans.B


8) SYMPHONY:COMPOSER

A.Leonardo:music B.Frescoainter

C.coloursallet D.art:appreciation

Ans.B

Remaining questions are in the attachment, please click on it………
Attached Files Available for Download
File Type: doc Oracle- placement papers.doc (48.5 KB, 45 views)
__________________
Answered By StudyChaCha Member
Reply With Quote
  #3  
Old January 24th, 2015, 05:49 PM
Super Moderator
 
Join Date: Nov 2011
Default Re: Oracle Recent placement papers

Here I am providing you Aptitude & Technical Recent Placement Papers for Oracle Campus Placement.

Oracle Campus Placement Paper:

1. A certain number of men can finish a piece of work in 10 days. If however there were 10 men less it will take 10 days more for the work to be finished. How many men were there originally?
(A) 110 men
(B) 130 men
(C) 100 men
(D) none of these

2. In simple interest what sum amounts of Rs.1120/- in 4 years and Rs.1200/- in 5 years ?
(A) Rs. 500
(B) Rs. 600
(C) Rs. 800
(D) Rs. 900

3. If a sum of money compound annually amounts of thrice itself in 3 years. In how many years will it become 9 times itself.
(A) 6
(B) 8
(C) 10
(D) 12

4. Two trains move in the same direction at 50 kmph and 32 kmph respectively. A man in the slower train observes the 15 seconds elapse before the faster train completely passes by him. What is the length of faster train ?
(A) 100m
(B) 75m
(C) 120m
(D) 50m

5. How many mashes are there in 1 square meter of wire gauge if each mesh is 8mm long and 5mm wide ?
(A) 2500
(B) 25000
(C) 250
(D) 250000

6. x% of y is y% of ?
(A) x/y
(B) 2y
(C) x
(D) can't be determined

7. The price of sugar increases by 20%, by what % should a housewife reduce the consumption of sugar so that expenditure on sugar can be same as before ?
(A) 15%
(B) 16.66%
(C) 12%
(D) 9%

8. A man spends half of his salary on household expenses, 1/4th for rent, 1/5th for travel expenses, the man deposits the rest in a bank. If his monthly deposits in the bank amount 50, what is his monthly salary ?
(A) Rs.500
(B) Rs.1500
(C) Rs.1000
(D) Rs. 900

9. What is the difference between the two declaration ?
#include
&
#include "stdio.h

(A) No Difference
(B) The 2nd declaration will not compile
(C) First case Compiler looks in all default location and in 2nd case only in the working directory
(D) Depends on the Compiler

10. How can I print a "% character in a in between the string foo and the value held in the variable foo using printf format string?
(A) fprintf("foo " "%" "%d
", foo);
(B) fprintf("foo '%' %d
", foo);
(C) fprintf("foo \% %d
", foo);
(D) fprintf("foo " "%d
", foo);

11. What is the output of the following program
#include
#define FIRST_PART 7
#define LAST_PART 5
#define ALL_PARTS FIRST_PART + LAST_PART
int main() {
printf ("The Square root of all parts is %d
, ALL_PARTS * ALL_PARTS) ;
return(0);
}

(A) 35
(B) 144
(C) 49
(D) 47

12. What is the use of a make file
(A) Do detect memory leakage
(B) To optimise the code
(C) To link and compile source code to exe
(D) To disassemble the exe to source code

13. What is the difference between calloc and malloc
(A) calloc allocates memory in contiguous bytes, malloc does not ensure contiguous memory allocation
(B) Memory allocated through calloc need not be freed explicitly, While memory allocated through malloc needs to be freed explicitly.
(C) calloc initialises the memory by setting all-bits-zero, malloc does not does any zero fill.
(D) all of the above

14. What is the output :
void main()
{
int a,b=5,c=10;

a = (b-c) > (c-b) ? b : c;

printf("%d,a);

}

(A) 10
(B) 5
(C) 0
(D) Error

15. What is the value of *second_ptr
int *first_ptr;
int *second_ptr;

*second_ptr = 30;

ptr value = 1;

first_ptr = &value

second_ptr = first_ptr;

(A) 30
(B) 1
(C) first_ptr
(D) None of the above

16. How many columns are retrieved from this query:
SELECT address1||','||address2||','||address2 "Adress" FROM employee;
(A) 1
(B) 2
(C) 3
(D) 0

17. To produce a meaningful result set without any cartesian products, what is the minimum number of conditions that should appear in the WHERE clause of a four-table join?
(A) 8
(B) 3
(C) 4
(D) 5

18. Assuming today is Monday, 10 July 2000, what is returned by this statement:
SELECT to_char(NEXT_DAY(sysdate, 'MONDAY'), 'DD-MON-RR') FROM dual;
(A) 10-JUL-00
(B) 12-JUL-00
(C) 11-JUL-00
(D) 17-JUL-00

19. Which character is used to continue a statement in SQL*Plus?
(A) *
(B) /
(C) -
(D) @

20. When a user creates an object without a TABLESPACE clause, where will Oracle store the segment?
(A) System tablespace
(B) Users tablespace
(C) Default tablespace for the user
(D) Oracle will give an error

21. The primary key on table EMP is the EMPNO column. Which of the following statements will not use the associated index on EMPNO?
(A) select * from EMP where nvl(EMPNO, '00000') = '59384';
(B) select * from EMP where EMPNO = '59384';
(C) select EMPNO, LASTNAME from EMP where EMPNO = '59384';
(D) select 1 from EMP where EMPNO = '59834';

22. Which character function can be used to return a specified portion of a character string?
(A) INSTR
(B) SUBSTRING
(C) SUBSTR
(D) POS

23. Which command will delete all data from a table and will not write to the rollback segment?
(A) DROP
(B) DELETE
(C) CASCADE
(D) TRUNCATE

24. Which of the following can be a valid column name?
(A) Column
(B) 1966_Invoices
(C) Catch_#22
(D) #Invoices

25. Which Oracle access method is the fastest way for Oracle to retrieve a single row?
(A) Primary key access.
(B) Access via unique index
(C) Table access by ROWID
(D) Full table scan


01. what is an object groups?

ANS:- An object group is a container for a group of objects, you define an object group when you want to package related objects. so that you copy or reference them in another modules.

02. what are the different objects that you cannot copy or reference in object groups?

ANS:- objects of different modules another object groups individual block dependent items program units.

canvas views:-

03. what are different types of canvas views?

ANS:- content canvas views , stacked canvas views, horizontal toolbar, vertical toolbar.

04. explain about content canvas views?

ANS:- Most Canvas views are content canvas views a content canvas view is the "base" view that occupies the entire content pane of the window in which it is displayed.

05. Explain about stacked canvas views?

ANS:- Stacked canvas view is displayed in a window on top of, or "stacked" on the content canvas view assigned to that same window. Stacked canvas views obscure some part of the underlying content canvas view, and or often shown and hidden programmatically.

06. Explain about horizontal, Vertical tool bar canvas views?

ANS:- Tool bar canvas views are used to create tool bars for individual windows Horizontal tool bars are display at the top of a window, just under its menu bar.
Vertical Tool bars are displayed along the left side of a window

07. Name of the functions used to get/set canvas properties?

ANS:- Get_view_property, Set_view_property

Windows:-

08. What is relation between the window and canvas views?

ANS:- Canvas views are the back ground objects on which you place the interface items (Text items), check boxes, radio groups etc.,) and boilerplate objects (boxes, lines, images etc.,) that operators interact with us they run your form . Each canvas views displayed in a window.

09. What are the different modals of windows?

ANS:- Modal less windows , Modal windows

10. What are modal less windows?

ANS:- More than one modelless window can be displayed at the same time, and operators can navigate among them if your application allows them to do so . On most GUI platforms, modelless windows can also be layered to appear either in front of or behind other windows.

11. What are modal windows?

ANS:- Modal windows are usually used as dialogs, and have restricted functionality compared to modelless windows. On some platforms for example operators cannot resize, scroll or iconify a modal window.

12. How do you display console on a window ?

ANS:- The console includes the status line and message line, and is displayed at the bottom of the window to which it is assigned. To specify that the console should be displayed, set the console window form property to the name of any window in the form. To include the console, set console window to Null.

13. What is the remove on exit property?

ANS:- For a modelless window, it determines whether oracle forms hides the window automatically when the operators navigates to an item in the another window.

14. How many windows in a form can have console?

ANS:- Only one window in a form can display the console, and you cannot change the console assignment at runtime.

15. Can you have more than one content canvas view attached with a window?

ANS:- Yes. Each window you create must have at least one content canvas view assigned to it. You can also create a window that has manipulate content canvas view. At run time only one of the content canvas views assign to a window is displayed at a time.

16. What are the different window events activated at runtimes?

ANS:- When_window_activated
When_window_closed
When_window_deactivated
When_window_resized
Within this triggers, you can examine the built in system variable system.event_window to determine the name of the window for which the trigger fired.

Modules:-

17. What are different types of modules available in oracle form?

ANS:- Form module - a collection of objects and code routines
Menu modules - a collection of menus and menu item commands that together make up an application menu
library module - a collectio of user named procedures, functions and packages that can be called from other modules in the application

18. What are the default extensions of the files created by forms modules?

ANS:- .fmb - form module binary
.fmx - form module executable

19. What are the default extensions of the files created by menu module?

ANS:- .mmb, .mmx

20 What are the default extension of the files created by library module?

ANS:- The default file extensions indicate the library module type and storage format .pll - pl/sql library module binary

Master Detail:-

21. What is a master detail relationship?

ANS:- A master detail relationship is an association between two base table blocks- a master block and a detail block. The relationship between the blocks reflects a primary key to foreign key relationship between the tables on which the blocks are based.


22. What is coordination Event?

ANS:- Any event that makes a different record in the master block the current record is a coordination causing event.

23. What are the two phases of block coordination?

ANS:- There are two phases of block coordination: the clear phase and the population phase. During, the clear phase, Oracle Forms navigates internally to the detail block and flushes the obsolete detail records. During the population phase, Oracle Forms issues a SELECT statement to repopulate the detail block with detail records associated with the new master record. These operations are accomplished through the execution of triggers.

24. What are Most Common types of Complex master-detail relationships?

ANS:- There are three most common types of complex master-detail relationships:
master with dependent details, master with independent details, detail with two masters

25. What are the different types of Delete details we can establish in Master-Details?
ANS:- Cascade, Isolate, Non-isolote

26. What are the different default triggers created when Master Deletes Property is set to Non-isolated?
ANS:- Master Delets Property Resulting Triggers

Non-Isolated(the default) On-Check-Delete-Master
On-Clear-Details
On-Populate-Details

27. What are the different default triggers created when Master Deletes Property is set to Cascade?
Ans: Master Deletes Property Resulting Triggers, Cascading On-Clear-Details, On-Populate-Details, Pre-delete

28. What are the different default triggers created when Master Deletes Property is set to isolated?

ANS:- Master Deletes Property Resulting Triggers, Isolated On-Clear-Details, On-Populate-Details

29. What are the Coordination Properties in a Master-Detail relationship?
ANS:- The coordination properties are Deferred, Auto-Query . These Properties determine when the population phase of block coordination should occur.

How compiler treats variables of recursive functions

What is orthogonal matrix?

Given two tables and asked 2 qns on those table ,

One is on join and another is on NOT IN

Given some qns on pointers( pretty easy)

Given five qns on data structures like , lifo, fifo

Qtn on primary key

How NULL in sql is treated?

Given a doubly linked list and asked r->left->right->data ans: r->data

Explain const char *ptr and char *const ptr

Remaining i didn`t remember

Technical

What is the output of the following program?ffice" "
#include
#include
void main( )
{
int a=5,b=7;
printf(“%d\n”,b\a);
}
A. 1.4
B. 1.0
C. 1
D. 0

What is the output of the following program listing?
#include
void main ( )
{
int x,y:
y=5;
x=func(y++);
printf(“%s\n”,
(x==5)?”true”;”false”);
}
int func(int z)
{
if (z== 6)
return 5;
else
return 6;
}
A True
B false
C either a or b
D neither a nor b

What is the output of the following progarm?
#include
main( )
{
int x,y=10;
x=4;
y=fact(x);
printf(“%d\n”,y);
}
unsigned int fact(int x)
{
return(x*fact(x-1));
}
A. 24
B. 10
C. 4
D. none

Consider the following C program and chose collect answer
#include
void main( )
{
inta[10],k;
for(k=0;k<10;k++)
{ a[k]=k;}
printf (“%d\n”,k);
}
A. value of k is undefined ; unpredictable answer
B. 10
C. program terminates with run time error
D. 0

Consider the prog and select answer
#include
void main ( )
{
int k=4,j=0:
switch (k)
{
case 3: j=300;
case 4: j=400:
case 5: j=500;
}
printf (“%d\n”,j);
}
A. 300
B. 400
C. 500
D. 0

Consider the following statements:
Statement 1 A union is an object consisting of a sequence of named members of various types
Statement 2 A structure is a object that contains at different times, any one of the several members of various types
Statement 3: C is a compiled as well as an interpretted language
Statement 4: It is impossible to declare a structure or union containing an instance of itself
A. all the statements are correct
B. except 4 all are correct
C. statemnt 3 is only correct
D. statement 1,3 are incorrect either 2 or 4 is correct

consider the following program listing and select the output
#include
main ( )
{
int a=010,sum=0,tracker:
for(tracker=0;tracker<=a;tracker++)
sum+=tracker;
printf(“ %d\n”,sum);}
A. 55
B. 36
C. 28
D. n

Spot the line numbers , that are valid according to the ANSI C standards?
Line 1: #include
Line 2: void main()
Line 3: {
4 : int *pia,ia;
5 :float *pafa,fa;
6 :ia=100;
7 :fa=12.05;
8 :*pfa=&ia;
9 fa=&ia;
10 ia=pfa;
11 :fa=(float)*pia;
12 :fa=ia;
13 :}
a. 8 and 9
b. 9 and 10
c. 8 and 10
d. 10 and 11

What is the o/p of the follow pgm?
#include
main()
{
char char_arr[5]=”ORACL”;
char c=’E’;
prinf(“%s\n”,strcat(char_arr,c));
}
a: oracle
b. oracl
c. e
d. none

consider the following pgm listing
#include
main()
{
int a[3];
int *I;
a[0]=100;a[1]=200;a[2]=300;
I=a;
printf(“%d\n”, ++*I);
printf(“%d\n”, *++I);
printf(“%d\n”, (*I)--);
printf(“%d\n”, *I);
}
what is the o/p
a. 101,200,200,199
b. 200,201,201,100
c. 101,200,199,199
d. 200,300,200,100

which of the following correctly declares “My_var” as a pointer to a function that returns an integer
a. int*My_Var();
b. int*(My_Var());
c. int(*)My_Var();
d. int(*My_Var)();

what is the memory structure employed by recursive functions in a C pgm?
a. B tree
b. Hash table
c. Circular list
d. Stack

Consider the follow pgm listing?
Line 1: #include
2: void main()
3: {
4: int a=1;
5: const int c=2;
6: const int *p1=&c;
7: const int*p2=&a;
8: int *p3=&c;
9: int*p4=&a;

what are the lines that cause compilation errors?
a. 7
b. 8
c. 6 and 7
d. no errors

what will be the o/p
#include
main()
{
inta[3];
int *x;
int*y;
a[0]=0;a[1]=1;a[2]=2;
x=a++;
y=a;
printf(“%d %d\n”, x,(++y));
}
a. 0,1
b. 1,1
c. error
d. 1,2
what is the procedure for swapping a,b(assume that a,b and tmp are of the same type?
a. tmp=a; a=b;b=temp;
b. a=a+b;b=a-b;a=a-b;
c. a=a-b;b=a+b;a=b-a;
d. all of the above

Which of the following statements contains an error?
a.. SELECT * FROM emp WHERE empid = 493945;
b. SELECT empid FROM emp WHERE empid= 493945;
c. SELECT empid FROM emp;
d. SELECT empid WHERE empid = 56949 AND lastname = 'SMITH';

Which of the following correctly describes how to specify a column alias?
a. Place the alias at the beginning of the statement to describe the table.
b. Place the alias after each column, separated by white space, to describe the column.
c. Place the alias after each column, separated by a comma, to describe the column.
d. Place the alias at the end of the statement to describe the table.

The NVL function
a. Assists in the distribution of output across multiple columns.
b. Allows the user to specify alternate output for non-null column values.
c. Allows the user to specify alternate output for null column values.
d Nullifies the value of the column output

Output from a table called PLAYS with two columns, PLAY_NAME and AUTHOR,is shown below.Which of the following SQL statements produced it?
PLAY_TABLE
"Midsummer Night's Dream", SHAKESPEARE
"Waiting For Godot", BECKETT
"The Glass Menagerie", WILLIAMS

a SELECT play_name || author FROM plays;
b SELECT play_name, author FROM plays;
c SELECT play_name||', ' || author FROM plays;

d SELECT play_name||', ' || author PLAY_TABLE FROM plays;

Issuing the DEFINE_EDITOR="emacs" will produce which outcome?
a. The emacs editor will become the SQL*Plus default text editor.
b. The emacs editor will start running immediately.
c. The emacs editor will no longer be used by SQL*Plus as the default text editor.
d. The emacs editor will be deleted from the system.

The user issues the following statement. What will be displayed if the EMPID selected is 60494? SELECT DECODE(empid,38475, "Terminated",60494, "LOA", "ACTIVE")FROM emp;
a. 60494
b. LOA
c. Terminatedd. ACTIVE

SELECT (TO_CHAR(NVL(SQRT(59483), "INVALID")) FROM DUAL is a valid SQL statement.
a. TRUE
b. FALSE

The appropriate table to use when performing arithmetic calculations on values defined within the SELECT statement (not pulled from a table column) is
a. EMP
b. The table containing the column values
c. DUALD. An Oracle-defined table

Which of the following is not a group function?
a. avg( )
c. sqrt( )
c. sum( )
d. max( )

Once defined, how long will a variable remain so in SQL*Plus?
a. Until the database is shut down
b. Until the instance is shut down
c. Until the statement completes
d. Until the session completes

The default character for specifying runtime variables in SELECT statements is
a. Ampersand
b. Ellipses
c. Quotation marks
d. Asterisk

A user is setting up a join operation between tables EMP and DEPT. There are some employees in the EMP table that the user wants returned by the query, but the employees are not assigned to departments yet. Which SELECT statement is most appropriate for this user?
a. select e.empid, d.head from emp e, dept d;
b. Select e.empid, d.head from emp e, dept d where e.dept# = d.dept#;
c. Select e.empid, d.head from emp e, dept d where e.dept# = d.dept# (+);
d. Select e.empid, d.head from emp e, dept d where e.dept# (+) = d.dept#;

Developer ANJU executes the following statement: CREATE TABLE animals AS SELECT * fromMASTER.ANIMALS; What is the effect of this statement?
a. A table named ANIMALS will be created in the MASTER schema with the same data as the ANIMALS table owned by ANJU
b. A table named ANJU will be created in the ANIMALS schema with the same data as the ANIMALS table owned by MASTER
c. A table named ANIMALS will be created in the ANJU schema with the same data as the ANIMALS table owned by MASTER.
d. A table named MASTER will be created in the ANIMALS schema with the same data as the ANJU table owned by ANIMALS.

User JANKO would like to insert a row into the EMPLOYEE table, which has three columns: EMPID,LASTNAME, and SALARY. The user would like to enter data for EMPID 59694, LASTNAME Harris, but no salary. Which statement would work best?
a. INSERT INTO employee VALUES (59694,'HARRIS', NULL);
b. INSERT INTO employee VALUES (59694,'HARRIS');
c. INSERT INTO employee (EMPID, LASTNAME, SALARY) VALUES (59694,'HARRIS');
d. INSERT INTO employee (SELECT 59694 FROM 'HARRIS');

Which three of the following are valid database datatypes in Oracle? (Choose three.)
a. CHAR
b. VARCHAR2
c. BOOLEAN
d. NUMBER

Omitting the WHERE clause from a DELETE statement has which of the following effects?
a. The delete statement will fail because there are no records to delete.
b. The delete statement will prompt the user to enter criteria for the deletion
c. The delete statement will fail because of syntax error.
d. The delete statement will remove all records from the table.

Creating a foreign-key constraint between columns of two tables defined with two different datatypes will produce an error.
a. TRUE
b. FALSE

Dropping a table has which of the following effects on a nonunique index created for the table?
a. No effect.
b. The index will be dropped.
c. The index will be rendered invalid.
d. The index will contain NULL values.

To increase the number of nullable columns for a table,
a. Use the alter table statement.
b. Ensure that all column values are NULL for all rows.
c. First increase the size of adjacent column datatypes, then add the column.
d. Add the column, populate the column, then add the NOT NULL constraint.

Which line of the following statement will produce an error?
a. CREATE TABLE goods
b. (good_no NUMBER,
c. good_name VARCHAR2 check(good_name in (SELECT name FROM avail_goods)),
d. CONSTRAINT pk_goods_01
e. PRIMARY KEY (goodno));
f. There are no errors in this statement.

MAXVALUE is a valid parameter for sequence creation.
a. TRUE
b. FALSE

Which of the following lines in the SELECT statement below contain an error?
a SELECT DECODE(empid, 58385, "INACTIVE", "ACTIVE") empid
b. FROM emp
c. WHERE SUBSTR(lastname,1,1) > TO_NUMBER('S')
d. AND empid > 02000
e. ORDER BY empid DESC, lastname ASC;
f. There are no errors in this statement.

Which function below can best be categorized as similar in function to an IF-THEN-ELSE statement?
a. SQRT
b. DECODE
c. NEW_TIME
d. ROWIDTOCHAR

Which two of the following orders are used in ORDER BY clauses? (choose two)
a. ABS
b. ASC
c. DESC
d. DISC

You query the database with this command SELECT name FROM employee WHERE name LIKE ‘_a%’; Which names are displayed?
a. Names starting with “a”
b. Names starting with “a” or “A”
c. Names containing “a” as second character
d. Names containing “a” as any letter except the firs

PL/SQL

Which of the following statements is true 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.

Which of the following is 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. Requires exit condition to be defined.

A developer would like 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 would the developer 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

Which line in the following statement will produce an error?
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. It causes the cursor to close
b. It causes the cursor to open
c. It loads the current row values into variables
d. It creates the variables to 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

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);

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 < 30000000 THEN
set_budget(11,30000000);
END IF;
END;
You are about to add an argument to CALCULATE_BUDGET. What effect will this have?
a. The GET_BUDGET function will be marked invalid and must be recompiled before the next execution.
b. The SET_BUDGET function will be marked invalid and must be recompiled before the next execution.
c. Only the CALCULATE_BUDGET procedure needs to be recompiled.
d. All three procedures are marked invalid and must be recompiled.

Which procedure can be used to create a customized error message?
a. RAISE_ERROR
b. SQLERRM
c. RAISE_APPLICATION_ERROR
d. RAISE_SERVER_ERROR

The CHECK_THEATER trigger of the THEATER table has been disabled. Which command can yo issue to enable this trigger?
a. ALTER TRIGGER check_theater ENABLE;
b. ENABLE TRIGGER check_theater;
c. ALTER TABLE check_theater ENABLE check_theater;
d. ENABLE check_theater;

Examine this database trigger CREATE OR REPLACE TRIGGER prevent_gross_modification {additional trigger information}
BEGIN
IF TO_CHAR(sysdate,’DY’) = ‘MON’ THEN
RAISE_APPLICATION_ERROR(-20000,’Gross receipts cannot be ‘ || ‘deleted on Monday’);
END IF;
END; This trigger must fire before each DELETE of the GROSS_RECEIPT table. It should fire only once for the entire
DELETE statement. What additional information must you add?
a. BEFORE DELETE ON gross_receipt
b. AFTER DELETE ON gross_receipt
c. BEFORE (gross_receipt DELETE)
d. FOR EACH ROW DELETED FROM gross_receipt

Examine this function CREATE OR REPLACE FUNCTION set_budget (v_studio_id IN NUMBER,
v_new_budget IN NUMBER) IS
BEGIN
UPDATE studio
SET yearly_budget = v_new_budget
WHERE id = v_studio_id;
IF SQL%FOUND THEN
RETURN TRUEl;
ELSE
RETURN FALSE;
END IF;
COMMIT;
END;
Which code must be added to successfully compile this function?
a. Add “RETURN;” right before the “IS” keyword.
b. Add “RETURN number” right before the “IS” keyword.
c. Add “RETURN boolean” right after the “IS” keyword.
d. Add “RETURN boolean” right before the “IS” keyword.

Under which circumstance must you recompile the package body after recompiling the package specification?
a. Altering the argument list of one of the package constructs
b. Any change made to one of the package constructs
c. Any SQL statement change made to one of the package constructs
d. Removing a local variable from the DECLARE section of one of the package constructs

Procedure and Functions are explicitly executed. This is different from a database trigger. When is
a database trigger executed?
a. When the transaction is committed
b. During the data manipulation statement
c. When an Oracle supplied package references the trigger
d. During a data manipulation statement and when the transaction is committed

Which Oracle supplied package can you use to output values and messages from database triggers, stored procedures and functions within SQL*Plus?
a. DBMS_DISPLAY
b. DBMS_OUTPUT
c. DBMS_LIST
d. DBMS_DESCRIBE

What occurs if a procedure or function terminates with failure without being handled?
a. Any DML statements issued by the construct are still pending and can be committed or rolled back.
b. Any DML statements issued by the construct are committed
c. Unless a GOTO statement is used to continue processing within the BEGIN section, the construct terminates. The
construct rolls back any DML statements issued and returns the unhandled exception to the calling environment.

Examine this code
BEGIN
theater_pck.v_total_seats_sold_overall := theater_pck.get_total_for_year;
END;
For this code to be successful, what must be true?
a. Both the V_TOTAL_SEATS_SOLD_OVERALL variable and the GET_TOTAL_FOR_YEAR function must exist only in the body
of the THEATER_PCK package.
b. Only the GET_TOTAL_FOR_YEAR variable must exist in the specification of the THEATER_PCK package.
c. Only the V_TOTAL_SEATS_SOLD_OVERALL variable must exist in the specification of the THEATER_PCK package.
d. Both the V_TOTAL_SEATS_SOLD_OVERALL variable and the GET_TOTAL_FOR_YEAR function must exist in the specification of the THEATER_PCK package.

A stored function must return a value based on conditions that are determined at runtime. Therefore, the SELECT statement cannot be hard-coded and must be created dynamically when he function is executed. Which Oracle supplied package will enable this feature?
a. DBMS_DDL
b. DBMS_DML
c. DBMS_SYN
d. DBMS_SQL
__________________
Answered By StudyChaCha Member
Reply With Quote
Reply


Tags
Job Placement



All times are GMT +6. The time now is 02:26 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Friendly URLs by vBSEO 3.6.0 PL2

1 2 3 4 5 6 7 8