ALLInterview.com :: 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
   Testimonials Refer this Site  Refer This Site to Your Friends  Site Map  Contact Us      
   
 
 Categories >> Software >> Databases >> SQL PLSQL
 
Suggest New Category 
 


 

Question Asked @ Answers Views     Select
how to delete duplicate rows from a specified table(only single table) how do you know which join is need to be used ust   11  6763
why should required for Indexed by table in pl/sql    3  2858
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  2664
With out using count() function. How to the find total number of rows in a table?    5  5911
Please let me know if UNION ALL and Natural Join does the same operation and are same... igate   7  6657
can use the following like overloading concept in a single package: procedure p1(a varchar), procedure p1(a varchar2), procedure p1(a char)    5  2790
how can we find the select statement is indexed or not? cts   3  6587
how to debugg a procedure or package using dbms_output.put_line in plsql polaris   1  4010
i want to display 1 to 10 numbers using one select statement. oracle   18  16702
i have one table with accounts and amounts as colums.accounts with columns c and d. and amounts with values 1000,2000,3000 for c and 4000,5000,8000 for d.i need to find the sum of these accounts c and d individually and find the differences between their sum using one select statement. hewitt   11  6675
i have doubt that any one tell ref cursor comes in sql pl/sql? pls clarify? tech-mahindra   4  3173
If I have a table T with 4 rows & 2 columns A & B. A has values 1,2,3,4. and B has 10,20,30,40. Write an Update SQL query which can Swap the values of A & B for all records. (Do not use a sub-query)    5  3833
what is the use of anchoring object? what r the difference between anchoring object & enclosing object? can any one tell me all the details?    0  732
How many database objects (trigger, packages, sequence etc) uses a particular field in a given table. For ex: I want to know how many database object uses the ATTRIBUTE1 in the PO_VENDORS table. What query will give me the result showing the database object name(package, trigger etc), field_name used (in this case ATTRIBUTE1) and table_name (in this case PO_VENDORS). ibm   2  3576
Create table emp (id number(9), name varchar2(20),salary number(9,2)); The table has 100 records after table created.Now i nee to change id's Datatype is to be Varchar2(15). now Alter table emp modify(id varchar2(15),name varchar2(20), salary number(9,2)); Whether it will work or returns error? post answer with explanation. tcs   12  7319
E-Mail New Answers        Answer Selected Questions        Post New sql-plsql Questions
Prev    1   ... 5   ... 9   ... 13   ... 17   ... 21   ... 25    28   [29]    30  ... 33   ... 37   ... 41   ... 45   ... 49   ... 53    Next
 
 
 
 
 
Un-Answered Questions
 
 Question Views   Select
 
Differences between Oracle 9i and 10g (Probably in terms of SQL and PL/SQL)? 1448
C. Normalize the following data up to the 3rd Normal form. Create the tables and insert the data given. Emp_ID Name Dept_Name Salary Course_Title Date_Completed 100 Adam Marketing 48,000 SPSS 6/19/2008 Surveys 10/7/2008 140 Bob Accounting 52,000 Tax Acc 12/8/2008 110 Cathy IT SQL Server 1/12/2008 C# 4/22/2008 190 Dan Finance 150 Emily Marketing 55,000 SPSS 6/16/2008 42,000 Analysis 8/12/2008 Queries 1. Find all Names who have completed the SPSS Course. 2. Find employee with max salary. 3. Find employee with 2nd max salary. 4. Find all employees in Dept “Marketing”. 5. Find all the employees who have taken more than 2 courses. 6. Find all the employees who have completed the courses before month of September. 812
Maximum how many triggers can we use in trigger and How to find out how many records it fetched. 23
What is window clause? 25
Table 1: col1 Timestamp ---------------- 01-mar-2012 11:12:46 Table 2: col2 Timestamp -------------------- 01-mar-2012 11:12:10 01-mar-2012 11:11:23 Write a query to display a row with table2 col2 value less than tabl1 col1 value. Maximum timestamp value previous to table1 col1 value. Display a result as: Col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10 527
write a query that returns first characters of each word in Oracel/Sql pl sql 3793
What is Materialized View? In What Scenario we Use Materialized View? 3676
If i can use sys.check_constraints to display my constraints from my database using sql server 2005, how can i display then if i am using sql server 2000???? 2139
What are wait events. Describe the wait event tables. 1812
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 463
How well can multiple sessions access the same data simultaneously ? 485
what is the difference between trigger and constraint? 1925
What will be the output of the following String S = 1+2+"abc" S = ? String S1 = 1+2+"abc"+5+6 S1 = ? 566
i have some prob lem to tell me about my self in interview first round ... 305
How did you export data from database to excel file. 24
E-Mail New Answers        Answer Selected Questions