:: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Categories >> Software >> Databases >> SQL PLSQL


 Oracle interview questions  Oracle Interview Questions (2040)
 SQL Server interview questions  SQL Server Interview Questions (1080)
 MS Access interview questions  MS Access Interview Questions (25)
 MySQL interview questions  MySQL Interview Questions (194)
 Postgre interview questions  Postgre Interview Questions (6)
 Sybase interview questions  Sybase Interview Questions (22)
 DB Architecture interview questions  DB Architecture Interview Questions (5)
 DB Administration interview questions  DB Administration Interview Questions (213)
 DB Development interview questions  DB Development Interview Questions (53)
 SQL PLSQL interview questions  SQL PLSQL Interview Questions (775)
 Databases AllOther interview questions  Databases AllOther Interview Questions (107)
table :-
 city name   country code
 abc               11
 bcd                22
 cde                232
 def                 33

write a procedure , so that when we give a phone no. eg - 
1123456789 -
o/p sud be  city name = abc

           if phone no. - 2322345897 , o/p sud be =cde

note - bcd and cde  city name sud be diff. as dey diff only 
with th last no.

Pls ans. this questnion.
 Question Submitted By :: SQL-PLSQL
I also faced this Question!!     Answer Posted By  
# 1
create or replace procedure check1 (num number)
cursor c1(id number) is select b.a,,b.code from (
select instr(id,code,1,1) as a,city,code from t1 )b
where b.a=1;
v_id number;
v_code NUMBER;
v_city VARCHAR2(100);
open c1(num);
fetch c1 into v_id,v_city,v_code;
exit when c1%notfound;
dbms_output.put_line(v_city||' '||v_code);
end loop;
close c1;
Is This Answer Correct ?    0 Yes 0 No

Other SQL PLSQL Interview Questions
  Question Asked @ Answers
i hv 30 rows with date.ex:1month hav 4 weeks i want 1st day of the every week.write the qry for that.example jan has 4 weeks i need 1st dd for evry wk Aspire 1
What are the pre requisites?   1
why should required for Indexed by table in pl/sql   3
declare lowerl number:= 1; upperl number:= 3; num varchar2(10); begin for i into lowerl..upperl loop num:=num||to_char(lowerl); if i=3 then upperl:=5; end loop; message(num); What will be the output ? Oracle 3
If a View on a single base table is manipulated will the changes be reflected on the base table?   5
write a query that returns first characters of each word in Oracel/Sql pl sql   4
what is the main difference between join and subqurey? Oracle 3
why sql is used as interpreter frequently rather than a compile?   1
can we create index on index? iFlex 6
What is bulk collections?   1
What are the differences between Database Trigger and Integrity constraints ?   4
For more SQL PLSQL Interview Questions Click Here 

Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
Copyright 2013  All Rights Reserved.   ::