Data is stored in Scalable SQL in no particular sequence. If you want to see your data displayed in sequence, you must add an Order By clause to your Select statement.
Syntax:
Select */fieldname<mask> ...
from tablename
order by fieldname;
from tablename
order by fieldname;
Explanation:
- The Order By clause tells SQL you want the specified fields displayed in ascending order (ordered from A to Z, 1 to 100).
- In the SQL text box type:
Select City, VendId, Name
from TrnVendor
order by City;
from TrnVendor
order by City;
- Execute the SQL statement.
City | VendId | Name |
Bayshore | TV019 | Bayshore Consulting |
Burlington | TV020 | BayCon Group |
Chicago | TV003 | BedMakers Linen |
Chicago | TV016 | Music Maker |
Chicago | TV028 | Distant Horizons |
Chicago | TV029 | Paltry Play |
Chicago | TV030 | Make Shift Tilts |
Dallas | TV021 | Cooperative Operatives |
Dallas | TV026 | Clampett Oil |
Detroit | TV005 | Ray Block |
No comments:
Post a Comment