How to find out the second largest element from mysql table
Answer Posted / shanmukha
select min(salary) from Employee where salary in(select
distinct top 2 salary from Employee order by salary desc )
This is the query to find second maximum salary in MSSQL
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
How to calculate expressions with sql statements?
How to convert character strings to dates?
How to connect html form to mysql database using php?
How to determine the location of the data directory?
Why do we use preparedstatement?
I've looked but can't find a MySQL equivalent for MS SQL's xp_cmdshell. I have 7z files that I want to unzip and load into MySQL. I'm trying to write a sp to do the unzip, but I can't find a way to do that. Can anyone provide an example of a similar process in Windows? TIA.
How to create a new view in mysql?
How is oracle different from mysql?
Why is it called mysql?
What is difference mysql and mysqli?
Can varchar be primary key?
What is offset limit?
What is blob storage?
What is difference between mysql and mysqli?
What is heap table in mysql?