how to get top two salaries from employee tables

Answer Posted / maruti

select max(sal)
from emp
where sal < (select max(sal) from emp);

with this query u ll get second largest sal of that table
if u want to know max (sal) then it ll be...
select Max(sal)
from emp;

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

is it possible web application make it as executable file

1885


few automation basic questions One question to write a scriot in any language you know.

1757


Hi Frnds, this is Aman.. can anybody tell me plz what kind of QA Interview questions are asked by IDS Infotech Ltd., Chandigarh? I have lil bit experience only in Manual Testing.. Plz answer my question as soon as possible.. Thnx in advance..

1906


What is the quality process is following in your organization.

1764


There is an opening in our organization Sierra Atlantic, Hyderabad. All Manual test engineers with 2-3 years of experience can forward your resumes to mah_cs82@yahoo.com before May 01, 2008. (Only manual testers) with a covering letter, current CTC and Expected CTC.

1647






What is bottom-up approach?

673


please send me database stored procedure checklist.

2432


Which test cases are written first: white boxes or black boxes?

786


need answer interviewer will ask me about all project which i mention in resume or presently i'm working??please reply tomorrow is my interview

1617


What is pesticide paradox?

639


what is mean by Performance Related Testing in data base?

1734


Can any1 tell me suppose u r doing manual testing on unix platform with Shell Script, then how it is done? How u r implementing it & what is the use of Shell scripting on Manual Testing? plzzzzzzz i need ur help.

1787


Difference between adhoc testing and error guessing?

699


What are the bugs we cannot find in black box?

688


Hi Can any one tell wht type of questions will be asked in project manager round...urgent plz...

1571