:: 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 (2041)
 SQL Server interview questions  SQL Server Interview Questions (1082)
 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 (54)
 SQL PLSQL interview questions  SQL PLSQL Interview Questions (776)
 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
write a query to find out the no. of employees whose age is less than 25 and max of salary for the employees belonging to a particular department is less than 20000   6
Which one of the following is a reason that an INSERT statement might cause an error instead of executing correctly? 1. The INSERT statement was attempting to insert a record into a view that was created from more than one table. 2. The INSERT statement was attempting to insert a record using a combination of constants and values from an existing table. 3. The INSERT statement was attempting to insert a record with a non-NULL value into a table that has that column defined as NULL. 4. The INSERT statement was attempting to insert a record into a table by selecting a record from that same table. 5. The INSERT statement was attempting to insert a record into a view rather than a table. Sonata 1
What are the pre requisites?   1
what command is used to create a table by copying the structure of another table including constraints ? eicc 5
what is the order of pre-defined exceptions. TCS 6
Difference between DBMS and RDBMS...CODD's rules Polaris 4
what is the difference between union and union all Oracle 14
..........refers to the disk mirroring iFlex 2
What is Primary Key? Ramco 4
what is d diff between grant,commit,rollback n savepoint   1
what is pragma ? Polaris 1
What are different types of refreshment techniques of materialised view   2
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.   ::