Escolar Documentos
Profissional Documentos
Cultura Documentos
23) property of data which, when satisfied, requires every value of one attribute (column)
of a relation (table) to exist as a value of another attribute in a different (or the same)
relation (table)
(Ans: referential Integrity)
if 'Dinu'='dinu' then
&
endif;
a. true
b. false
(ANS:false)
4. customer table(columns) is a parent table and order table(columns) is a
child table----(ANS;for this answer is cascade delete)
7. where do we create function program in plsql block?
(ANS:answer is execution)
8. a number:=null
b number:=null
if a=b then
&
endif;
state whether if statement is true or false :
(ANS:FALSE)
9. create userdefined exception with the name myexp:
(ANS:answer is myexp exception)
11. can we have multiple triggers in the same table? state true/false
(ANS:TRUE)
13. dow do we delete trigger from the table?
(ANS:drop trigger triggername)
14. exception handling is done in:
exception
15. what datatype is used if the value of the variable is -524? (choose
three)
number
positive
integer
number(6,2)
(ANS:number,integer)
16. when trigger is fired?
Before log on or log off happens and
when a create or alter table is fired. Or
when data base starts up or shuts down
function_name(100)
.....
...
..
end
a. exception is not declared properly
b. cannot use function statement directly into the plsql block and
database
c. exception name is not declared
23. create procedure pro
a number
begin
a:=0.00
end pro
create procedure body pro
begin
dbms.....("discounted"||nuvl(a,1)
end pro
begin
a:=0.10
end
what is the value of a?
a. a=1
b. a=0.10
c. a value is 0.00 throughout the session
d. a value is 0.10 when package is invoked 1st time in session.
(plz conform the ans....)
24. varchar2
a. only characters
b. characters and numericals
c. only numbericals
26. find out word contaning pattern ill as last letters...the word has 4
letters for eg bill....
a. select.....where name='%ill%'
b. select.....where name like '_ill'
c. select.....where name='_%ill'
d................................
declarative
header
exception
executive
(ANS:header)
2. create trigger triggername
before logon
.
.
.
this trigger is of which type?
a. invalid trigger(answer)
3. an exception has error number and description but dont have name to raise
or while using when in plsql block
which type of exception is this
a,
b.
c.
d.
(ANS:B)
named
anonymous
unhandled
handled
q12
size of varchar2 in oracle 10g
ans 4000 bytes
q3
When a exception has a name and a number associated to it.
But does not have name to mention in the Raise or When clause then it is what type of exception.
ans
anonymus exception
q4
a number:=null;
b numbver:=null
if(a=b)
endif
-True/False
check the answer
might be false
false maine tuze explanation diya hai iska
q7 .in a procedure.. reqd statements which doent result in error.. end statements
this ques is like checkbox select two
Answer
1 end procedure_name;
2 end;
q9
In which of the following clauses can subquery be used?
a. into-----insert
b. from-----select
c. group by--d. order by--ans: a,b
q10: if the date is march 21, 2001;
write query for the format "21st of march 2011 14:00:00 am"
answer is: select to_char(to_date(21-march-2011,dd-mm-yyyy),'fmddspth "of" month yyyy
fmhh:mm:ss am') from dual;
plz check the answer not sure
q11
dow do we delete trigger from the table?
ans
drop trigger triggername
q12
what datatype is used if the value of the variable is -524? (choose three)
number
positive
integer
number(6,2)
answer
number
integer
q13. create trigger
trigger fired on:
1. before updation on some column
2. ............
Ans
you suppose to create trigger based on the aboue 2options....check the syntax of the block it
must contain before update...for each row
q14 declare
a varchar2(5);
begin
<inner>
begin
a ='justice';
when value_error then
raise num_not_found exception
when not_found then
dbms.......("inner block")
end
exception
when not_found then
dbms......("outer block");
a. no exceptions
b. inner block
c. outer block
d. num_not_found exception
q15.
create procedure procedure_name(id number in, city varchar2 in, name varchar2 in)
begin
insert into procedure_name(vid,vcity,vname) values(id,city,name)
end;
a. execute insert into procedure_name(123,'chennai','sunny')
c. execute insert into procedure_name(id=123,city=>chennai, name=>sunny)
b. execute insert into procedure_name(id:=123,city:='chennai',name:'sunny')
ans a
q16 function related block...dont remember......to retrieve the value....when compiled, error is
generated...??
the block is like this (think so)
declare
.....
begin
......
function_name(100)
.....
...
..
end
c. only numbericals
ans character and numericals
q20 3. Question on : definition was given and the options were a. query flashback,b. rollback segment,
c. cursor mgmt. I marked the answer as query falashbak . go through its definition
ans query flashback
q21 question package specification and body which is
ans package specification is invoked first time in one session
q22
CREATE OR REPLACE PACKAGE discounts
IS
g_id NUMBER := 7829;
discount_rate NUMBER := 0.00;
PROCEDURE display_price (p_price NUMBER);
END discounts;
/
CREATE OR REPLACE PACKAGE BODY discounts
IS
PROCEDURE display_price (p_price NUMBER)
IS
BEGIN
DBMS_OUTPUT.PUT_LINE(Discounted ||
TO_CHAR(p_price*NVL(discount_rate, 1)));
END display_price;
BEGIN
discount_rate := 0.10;
END discounts;
/
Which statement is true?
this ques is not same as in paper but answer is same for it u will get another ques their but answer is
samelike here
One question was on how to declare number in procedure answer was as below:
n1 number :=10;
n2 number;
One question on finding area in which width is not declared for that..
Ans: v_width variable is not declared
One question on varray:
Ans: the one which contains 1,1,1