Answer Posted / prakash.matte
if we want to make use of nested query instead of the above,
try the following
select max(column_name) from table_name where column_name =
(select
max(column_name)-(highest_salary_number_for_calculation -1)
from blocks where bid);
Example :
For second highest salary:
select max(bid) from blocks where bid = (select max(bid)-1
from blocks);
For third highest salary:
select max(bid) from blocks where bid = (select max(bid)-2
from blocks);
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
What are the steps involved to run php?
How we get browser details of clients machine?
What is advanced php programming?
What is php and its uses?
What is the difference between myisam and innodb?
Does php need html?
What are the differences between mysqli_connect and mysqli_pconnect?
Where is session value stored php?
How can we pass the variable through the navigation between the pages?
What is the function of trim?
Explain how we can retrieve the data in the result set of mysql using php?
How do you end php?
What is the difference between single quoted string and double quoted string?
Difference between mysql_connect and mysql_pconnect?
where do we use htaccess?