If you would like to see fields displayed in descending order, follow the field name with "desc" in the Order By clause.
Syntax:
Select */fieldname ...
from tablename order by fieldname <desc> ...
Explanation:
Retrieve the city, vendor ID, and name from the TrnVendor table. Order your data by city in descending order:
Select City, VendId, Name
from TrnVendor order by City desc;
| ||||||||||||||||||||||||||
Monday, 18 June 2012
Lesson 9: Displaying Rows in Descending Order in SQL
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment