:: 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 (2036)
 SQL Server interview questions  SQL Server Interview Questions (1076)
 MS Access interview questions  MS Access Interview Questions (24)
 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 (774)
 Databases AllOther interview questions  Databases AllOther Interview Questions (106)
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 have a tablle like this. cust acc --------------- a 1 b 2|3 c 4|5|6 I Want below o/p: cust acc ----------- a 1 b 2 b 3 c 4 c 5 c 6 Please any one can you have any ideas share me. I have urgent requirement. MTS 3
Write a query to find second highest salary of an employee.   26
What are the Restrictions on Cursor Variables?   2
use of IN/ANY/ALL Ramco 5
Write a procedure to return the month and the number of developers joined in each month (cursor ) Tech-Mahindra 2
using comand prompt how can import table data and table space with example   2
Name Salary Abc 50000 Abc 50000 xyz 20000 find the max salary using aggregate function? CTS 1
why should required nested tables, Object types, partition tables and varying arrays. what is the difference between these are all. give me example with explanation.   1
in materialized view the structure will create immediately or not? iFlex 2
Types of joins ? TCS 11
how to create user in sql and how to set password for that?   3
What is a cursor for loop ?   3
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.   ::