In this lesson, you learn how to use the
ORDER BY clause to sort retrieved data as needed.
As you learned in the last lesson, the following SQL statement returns a single column from a database table. But look at the output. The data appears to be displayed in no particular order at all.
SELECT prod_name FROM products;
prod_name -------------- .5 ton anvil 1 ton anvil 2 ton anvil Detonator Bird seed Carrots Fuses JetPack 1000 JetPack 2000 Oil can Safe Sling TNT (1 ...