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
Write a program to get lcm of two numbers using php?
What is the Pipe Symbol represented?
How to read a file in binary mode?
"mysql_fetch_row — Get a result row as an enumerated array",this sentence comes from the PHP offical manual.However ,i can not understand the words "enumerated array".I need some help.Thanks a lot to everyone that reply.
What is difference between base_url and site_url?
am from coimbatore.am learning php&mysql. what will be the approx salary for me if i get a job in coimbatore.
What is use of count() function in php?
Is laravel an oop?
What is the alternative structure for control structures?
Why print_r is used in php?
How to pass variables and data from php to javascript?
What is isset php?
How do you access a get requests url parameter with php?
Why php language is used?
What is the apache?