mysql - SQL query to get highest values in a table -


i have table following information:

id          name        value        ===         =====       ======= 1           apple       5 2           green       10 3           orange      1 4           blue        0 5           fish        3 6           lettuce     2 7           cabbage     4 8           computer    1 9           car     0 10          sport       9 11          racing      15 

i want able pull 3 highest value records in table. example want pull following in order.

11          racing      15 2           green       10 10          sport       9 

i know can use order order them value gives me highest first. how query records?

you can as

select * your_table order value desc limit 3 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -