Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

SQL PLSQL Interview Questions
Questions Answers Views Company eMail

trans_id trans_date trans_amt debit_credit_indicator 001 01-JAN-13 1099 cr 001 12-JAN-13 500 db 002 24-FEB-13 400 db 002 23-MAR-13 345 cr 001 18-APR-13 800 cr 002 15-MAR-13 600 db 001 12-FEB-13 200 cr i want like this output trans_id trans_date trans_amt debit_credit_indicator 001 JAN 1599 cr no.of trans 2 i want trans_id and trans_date like 'JAN' or 'FEB' etc, trans_amt i want all credit amount - debit amount per each trans_id. and debit_credit_indicator and no.of transactions in a month.

Oracle,

1 4306

I Have A Table Like This. Cityno Cityname Mails 1 Bangalore 8km 2 Hsr Layout 20km 3 Mejistic 30km 4 Jayadeva 55km 5 Itpl 80km 6 Hebbal 115km I Have Data Like This I Want O/p Like This Distance No.ofcity 0-50km 3 51-100km 2 101-150km 4 And So On

DELL, HCL, Oracle,

6 10645

i have a customer table. trans_id trans_date trans_amt debit_credit_indicator 001 01-JAN-13 1099 cr 001 12-JAN-13 500 db 002 24-FEB-13 400 db 002 23-MAR-13 345 cr 001 18-APR-13 800 cr 002 15-MAR-13 600 db 001 12-FEB-13 200 cr i want like this output. trans_id trans_amt debit_credit_indicator i want get highest credit amount and lowest credit amount and highest debit amount and lowest debit amount for each trans_id. pls give me answer. i want urgent

3 4451

i have a table like this. cityno cityname mails 1 BANGALORE 8KM 2 HSR LAYOUT 20KM 3 MEJISTIC 30KM 4 JAYADEVA 55KM 5 ITPL 80KM 6 HEBBAL 115KM I HAVE DATA LIKE THIS I WANT O/P LIKE THIS DISTANCE NO.OFCITY 0-50KM 3 51-100KM 2 101-150KM 4 AND SO ON pls give me answer. i want urgent

6 6317

i have xml source. xml source having lacks of records. i want extract/retrive xml source data using sql query. please tell me how to write query.

TCS,

4 6340

i have table T!. A B C D NULL 1 2 3 4 NULL 5 6 7 8 NULL 9 10 11 12 NULL. I WANT COUNT OF NULL VALUES IN TABLE. WRITE A QUERY.

iGate, Wipro,

14 16691

what is d diff between grant,commit,rollback n savepoint

1 7082

PL/SQL allocates memory for the variable's at runtime or at compile time

3 5472

what is self join and how it works??

Infosys,

2 6853

wtite down triggr not any entry on Sunday

NIT,

2 4843

hi,i plan to put experience on PLSQL ,can anyone suggest me for any institutes in bangalore or how to prepare for interviews

1390

Hi All, I am new to both this blog and technology. I was able to see a response for one of the questions on triggers as below. I would like to know why are we using " if rtrim(to_char(sysdate,'day'))=rtrim('sunday') then" instead, can't we use " if sysdate = 'sunday' then". I can understand the use of "rtrim", but dont know y v r using to_char. I have seen this in many cases but did not get a convincible explaination. Please help me with this and do excuse if this question sounds silly. Thanks in advance...... create or replace trigger trg_sun before insert on

begin if rtrim(to_char(sysdate,'day'))=rtrim('sunday') then raise_application_error(-20345,'no transaction in sunday'); end if; end trg_sun;

2 2918

how to check the 3rd max salary from an employee table? One of the queries used is as follows: select sal from emp a where 3=(select count(distinct(sal)) from emp b where a.sal<=b.sal). Here in the sub query "select count(distinct(sal)) from emp b where a.sal<=b.sal" or "select count(distinct(sal)) from emp b where a.sal=b.sal" should reveal the same number of rows is in't it? Can any one here please explain me how is this query working perfectly. However, there is another query to get the 3rd highest of salaries of employees that logic I can understand. Pls find the query below. "select min(salary) from emp where salary in(select distinct top 3 salary from emp order by salary desc)" Please explain me how "select sal from emp a where 3=(select count(distinct(sal)) from emp b where a.sal<=b.sal)" works source:http://www.allinterview.com/showanswers/33264.html. Thanks in advance Regards, Karthik.

4 6100

Display the total debit counts, total credit counts, sum of total debits, sum of total credits from an employee's transaction table (a single table) containing the following columns. Transaction_number Transaction_amount Transaction_date Transaction_type --> tells if the amount is a credit or a debit. As the query alone is important, the table is left with specifying just the field's name. Pls help me with this query.

iNautix, Oracle,

3 15076

Create a procedure to delete certain records from a table and display the total number of records deleted in this process. (Condition for deletion can be of ur choice, for instance delete all records where eid='')

2 6447


Post New SQL PLSQL Questions

Un-Answered Questions { SQL PLSQL }

What is the importance of sqlcode and sqlerrm?

580


What is varchar data type in sql?

368


What are pl/sql cursor exceptions?

414


What is a primary key sql?

405


what are the features and advantages of object-oriented programming? : Sql dba

397






What is nvarchar max in sql?

427


what are different types of keys in sql?

453


What is the difference among union, minus and intersect?

382


Cite the differences between execution of triggers and stored procedures?

425


How do you use join?

366


What is the use of primary key?

360


How do you exit in sql?

446


What is java sql connection?

365


Can we commit inside a trigger?

394


Are ddl triggers fired for ddl statements within a pl/sql code executed using the dbms.sql package?

434