How to find out the second largest element from mysql table

Answer Posted / salil

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

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how you will show all records not containing the name "sonia" and the phone number '9876543210' order by the phone_number field.

504


Does mysql use sql?

490


What is a string in mysql?

461


Where the database is stored in mysql?

491


Can you tell which of the following where clauses is faster?

440






In which year mysql created?

527


What is 'mysqld'?

505


Can mysql handle big data?

519


How many TRIGGERS are allowed in MySql table?

576


What are the reasons for selecting lamp (linux, apache, mysql, php) instead of combination of other software programs, servers and operating systems?

569


What is difference between mysql and mysql workbench?

456


What is mysql cursor?

499


How do I edit a trigger in mysql?

480


What is blob in mysql?

492


Why to use char instead of varchar in the database?

567