Posted: Sun Dec 16, 2007 10:07 am Post subject: Example of sorting in mysql table
Sorting is done on table to get descending and ascending order of any particular attribute and field.
Why we need sorting.
This is question in our mind. Suppose we have 20000 records. Every day it added more 500 records, user want to see only those record that inserted in current date. This needs a sorting on date. Sorting in mysql can be on any data type.
Take a table to sort and order by
SELECT iStateID, sStateName, dCreatedDate FROM statemaster s