Tuesday, April 26, 2011

How to find the second heighst record from table


How to find the max price from the given table in sql
SELECT max(price) FROM `productprice`
How to find  the second heist record from table
SELECT `price` FROM `productprice` group by `price` order by `price` desc limit 1,1

No comments:

Post a Comment