SQL PLSQL Interview Questions
Questions Answers Views Company eMail

How well can multiple sessions access the same data simultaneously ?

Oracle,

1 1606

What is Data Concarency and Consistency?

1 4193

What is Overloading of procedures ?

Amdocs,

4 7716




How to return more than one value from a function?

Satyam,

11 23414

How can you create Cursor with parametres ?

3 5444

How you will create Toad Function?

1 15334

what is a sub query?how will you calculate working days in a month using sub query?

InteQ,

4 8659

what is difference between procedure and function

Wipro, MCN Solutions,

8 8361




in procedure how to return a value

Wipro,

3 7480

in a package one procedure is wrong package shows valid or not

4 5200

what is cursor procedure

iGate,

1 5184

what is global variable in package

Polaris,

3 8416

is it mandatory to select all the column in a view then what columns should be selected

2 4032

difference between pl/sql table and normal pl/sql table

2 9900

will function return more than one value how

Accenture,

9 16099


Post New SQL PLSQL Questions






Un-Answered Questions { SQL PLSQL }

Does user triggers have entry for trigger with compilation errors?

5


How to display Row Number with Records in Oracle SQL Plus?

10


What is PL/SQL Records?

9


What operators deal with null?

3


difference between anonymous blocks and sub-programs.

1






What are the different datatypes available in PL/SQL?

16


Define SQL and state the differences between SQL and other conventional programming Languages?

10


Is it possible to pass parameters to triggers?

1


What are the two types of exceptions.

1


GLOBAL TEMPORARY TABLE over Views in advantages insolving mutating error?

1868


What is an intersect?

4


what are sequences

276


Do triggers have restrictions on the usage of large datatypes, such as long and long raw?

1


Hi, I am new in oracle(SQL), could anyone help me in writing a correct SQL. Below is the table structure. Table: Subsc Fields: 1. Sub_no (this field will hold values of subscriber nos, for e.g. S111111, S222222, S333333, S444444, etc.) 2. s_status (this field will hold values for different status of subscriber, for e.g. 'A', 'S', 'C', etc.) 3. cus_id (this field will hold values of bill nos for e.g. 11111111, 22222222, 33333333, 44444444, etc.) Table: Bill Fields: 1. Bill_no this field will hold values of bill nos for e.g. 11111111, 22222222, 33333333, 44444444, etc.) 2. b_status = (this field will hold values for different status of bill for e.g. 'O', 'C', 'S', etc.) Note: 1. The Sub_no is a Primary key of Subsc table. 2. The cus_id is a foreign in Subsc table (referred from Bill_no field of Bill table) 3. The Bill_no field is the Primary key of Bill table. Query A --> I wrote a query to select cus_id/Bill_no which is in status open (b_status = 'O') and having more than two active subscriber (i.e. S_status = 'A') in it ( i.e. more the two subscribers in same bill). select s.cus_id from subsc s where exists (select 1 from bill where bill_no = s.cus_id and b_status = 'O') and s_status = 'A' group by s.cus_id having count(sub_no) = 2 Problem : The above query will give the cus_id (or rather bill_no) which are in open status (b_status ='O) and which are having TWO ACTIVE Subscribers (s_status ='A') in it. However, this query will also lists the cus_id/bill_no which are having more than TWO subscribers in it (but only two subscriber will be in Active status (s_status = 'A') and the others will be in s_status = 'C' or s_status = 'S'. Help needed: I want to write a query which will fetch ONLY the cus_id/bill_no which are in open status (b_status ='O') and which are having ONLY TWO ACTIVE subscribers (s_status ='A') in it. B--> If I include the sub_no in the above query then NO row are returned. select s.cus_id, s.sub_no from subsc s where exists (select 1 from bill where bill_no = s.cus_id and b_status = 'O') and s_status = 'A' group by s.cus_id, s.sub_no having count(sub_no) = 2 Help needed: I want to modify the above query which will fetch ONLY the cus_id/bill_no which are in open status (b_status ='O') and which are having ONLY TWO ACTIVE subscribers (s_status ='A') in it ALONG with the sub_no. Thanks a lot in advance. Regards, Nitin

983


How is a PL/SQL code compiled?

16