Given an employee table, how would you find out the second
highest salary?

Answer Posted / balindra sahani

select max(sal) from emp
where sal not in (select max(sal) from emp )

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about the storage and physical database design?

533


What are the 18 schemas?

612


I HAVE A PI ON COL A THE NEXT DAY I WANT CHANGE THE PI ON COL B? PLS SEND ME THE ANS

2420


What are data modelling techniques?

526


How to replace not in with not exist?

1465






Explain about the relational database?

608


What are the main phases of database development?

540


If a column is an image value type, how you can compare column values? How can you use this column in join clause?

592


Write the fastest query to find out how many rows exist in a table?

663


What are the constraints on severity level in raiseerror?

583


You have a table with three columns: amount1, amount2, and amount3 in a single row only one of these three columns will have a value and the other two will be null. Write a sql query to retrieve the values from these columns?

547


Hi my program is accesing data from two db2 databases.what is the bind card for this program to genarate plan? how to specify the two owners and two qualifiers in bind card

1674


In which database can extended stored procedures be added?

530


Which four data types cannot be used as a return type from a user-defined function?

581


Where is dbms used?

623