Write a query to get 2nd maximum salary in an employee table ?
Answer Posted / sandip
SELECT MAX(SAL) FROM EMPLOYEE WHERE SAL<(SELECT MAX(SAL)
FROM EMPLOYEE);
I don't think this will work correct me if i am
wrong.Correct one is-------
SELECT MAX(SAL) as SAL FROM EMPLOYEE WHERE SAL<(SELECT MAX(SAL)
FROM EMPLOYEE);
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to change a value of the field ‘salary’ as 7500 for an employee_name ‘john’ in a table employee_details?
What are views in sql?
What are different joins used in sql?
What is the difference between joins?
What is a database trigger?
What is error ora-12154: tns:could not resolve the connect identifier specified?
Is merge a dml statement?
What is a subquery in sql?
What is query execution plan in sql?
Explain the uses of control file.
What are the different types of dbmss?
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 jobs use sql?
what does myisamchk do? : Sql dba
Where is sql database stored?