SQL PLSQL Interview Questions
Questions Answers Views Company eMail

source destination distance chennai bangalore 500 bangalore chennai 500 hyd delhi 1000 delhi hyd 1000 bangalore hyd 800 Here chennai to bangalore and bangalore to chennai is same distance. and hyd and delhi also same criteria. Based on the distance i want to display only one row using sql query?

JPMorgan Chase,

4 4085

While inserting/updating million of records into a database table, how do I came to know how many records has been inserted or updated successfully so far?


2 3657

How to fetch records from a partitioned table?


2 3789

How many triggers can be implemented for a table?


3 3418

My select statement is not working as expected, So, to overcome from such issues what are the steps needed to be taken care?


2 1969

I have a table with 1 million records out of which 10,000 records are of unique records, then if I will implement index, then which type of index shall I use and why shall I use?


2 3822

Can we use commit or rollback in trigger? If yes, then how. Please explain with a suitable example?


5 5591

How to generate a salary slip like jan 1000 1000 feb 1000 2000 ... dec 1000 12000



How to convert lowercase letters to uppercase and uppercase letters to lowercase in a string. (ex, AbcdEfG should convert as aBCDeFg)


3 3685

I want to execute a piece of code before calling a procedure. How to achieve it?


1 2052

There are 5 records in a table and we have implemented two triggers that are :pre_query and post_query how many times these triggers will fire.

Maruti Suzuki,

2 1998

table name: prod there are three fields in the table that are 1.proddate 2.prodQty 3.model Day wise prodQty is stored in the table prod write a query to display total prodqty in the year 2004 april.

Maruti Suzuki,

2 1441

table name :Tab fields name 1.trx_no (pk) 2.trx_date 3.account code (7 char) 4.account type (1 char) 5.amt Tab contains account code day wise debit and credit transaction , account type fiels can have 2 value D for debit and c for Credit . write a query to display the account code wise total debit and credit bal for the month of april 2004. write a query to display account code wise new amt credit for the april 2004

Maruti Suzuki,

2 1714

Hi Guys, I have a situation where I need to access the column values from rowtype variable. However, the column names are dynamic. below is sample code: declare Cursor c1 is select * from emp; Cursor c2 is select column_name from xyztable; v_c2 c2%rowtype; v_str varchar2 v_value varchar2(200); begin for rec in c1 loop open c2;---this cursor has column names like EMPLOYEE_ID, FIRST_NAME, LAST_NAME etc. loop fetch c2 into v_c2; exit when c2%notfound; /* now lets say i want to access value of LAST_NAME from cursor c1, so I am writing below code, however it does not work as expected */ v_str:= 'rec.'|| v_c2.column_name; -- this will give me string like "rec.EMPLOYEE_ID" v_value:=v_str; end loop; end loop; end; / Plz help ASAP.Thanks.

2 1358

difference between SQL and C

Indus Software Technologies,

1 1596

Post New SQL PLSQL Questions

Un-Answered Questions { SQL PLSQL }

Write a query to genarate target column.Please answer me. Advance Thanks. Src Tgt Q10 Quarter to 2010 Q90 Quarter to 1990 Q80 Quarter to 1980 Q74 Quarter to 1974


What are local and global Indexes and where they are useful.


a table has 2 classifications 1)liabilities 2)earnings this liabitity has 2 elements with 2 input values and the earnings have 2 elements with 2 input values i wrote a query so that my input is liability savings amount1 amount2 xxxx null xxxxxx 0 xxx1 null xxxxx1 0 null yyyy 0 yyyy null yyy1 0 yyy1 my problem is --when i developed a report(d2k) with this data my o/p is liabilities,amount1,savings,amount2 xxxx xxxxxx xxx1 xxxxx1 yyyy yyyy yyy1 yyy1 how could i move this savings,savings values 2 palces up. can any body provide me witha better solution


What is your daily office routine?


i have some prob lem to tell me about my self in interview first round ...


how to delete duplicate rows from a join tables(I have three tables on that join) how do you know which join is need to be used? The select statement I have is: SELECT gc_skill_type.skill_type, gc_area_tec.area, gc_technology.technology, gc_technology.id_technology, gc_area_tec.id_area_tec FROM gc_skill_type, gc_area_tec, gc_technology WHERE gc_area_tec.id_skill_type (+) = gc_skill_type.id_skill_type AND gc_technology.id_area_tec (+) = gc_area_tec.id_area_tec order by gc_skill_type.skill_type asc, gc_area_tec.area asc, gc_technology.technology asc


What is AUTH_ID and AUTH_USER in pl/sql ?


What action do you have to perform before retrieving data from the next result set of a stored procedure ?


what is try_catch block in procedure


in oracle 10g sw after compiling procedure how to pass parameter values ,if we (v_empid out number)how to give empid after successful compilation program.This site exact suitable for 10g with respect to question & answer same format , im trying sql browser & sql command prompt using exec procedure name & respective parameters.


what is the difference difference between procedure and packages


ERROR:Insert or update on table"accnt" violates foreign key constraints "acct_to_curr_symbol" DETAILS:KEY(accnt_curr_id)(-2)is not present in the table "curr_symbol" ......solve The Problem..


What is Histogram?


Whis is not false in primary key?


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.