please give me the answer for this:
query which generates the second highest integer in the table?

Answer Posted / salil

Without using LIMIT

SELECT max( t1.col )
FROM `table` t1
WHERE t1.col < (SELECT max( t2.col ) FROM `table` t2);

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is truncate command?

646


What happens if null values are involved in expressions?

783


Can you tell how to find the number of rows in a resultset using php?

673


What is the difference between unix timestamp and mysql timestamp?

729


Can u give the example by taking an unnormalized table and make that 1nf and then 25nf, and then 3 nf?

4405


Does mysql support nosql?

668


How to check server status with 'mysqladmin'?

772


What is the difference between char and varchar?

795


How to run 'mysql' commands from a batch file?

684


How to store binary data in mysql?

712


Is there a free mysql?

669


How do I show all mysql databases?

702


What is a crosstab query?

701


What are the 'mysql' command line options?

692


What is the command line end user interface - mysql?

742