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

Answer Posted / mithilesh mishra

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

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

2416


What is a database development?

522


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


State the acid rules?

682


Pgm A calls Pgm B and pgm B uses cursor, when pgm B is called second time, the program is abending saying the cursor is opened? Why?

2008






How would you design a database for an online site, which would average a million hits a day?

576


The count() function always returns a int value type what should you do if you need to count rows from a query which you know will return a value that is too large for an int value type?

576


How you can make a parameterized view?

558


Explain the process of the user request and data generating?

651


Why does this query return 0?

623


I have a few records all are same structures data, I want to store data in multiple targets how

2142


Explain the cube operator?

602


Who are naive users?

606


What is an application role and explain a scenario when you would use one?

560


How to combine two function together?

1661