0

Hi i'm trying to write a simple SQL command to use within PHP.

I want to select the whole table, sort by one of the columns, then only display the top 100 rows.

Without the WHERE rownum <=10 it works fine. But it displays the whole contents of the table rather than the top 10 from the quantity column.

Thanks

3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by saurav.prasad28
0

I think this is helpful for you

select * from employee order by book_id  limit 7;

Thanks

Edited by mike_2000_17: Fixed formatting

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.