order.
譯:結果將會以supplIEr_city排序的升序結果返回所有記錄。
Example #2
SELECT supplIEr_city
FROM supplIEr
WHERE supplIEr_name = 'IBM'
ORDER BY supplIEr_city DESC;
This would return all records sorted by the supplier_city fIEld in descending order.
譯:以supplIEr_city的降序結果返回所有記錄。
Example #3
You can also sort by relative position in the result set, where the first field in the result set is 1. The next fIEld is 2, and so on.
譯:你可以采用字段的相對位置作為排序,第一個字段為1,下一個為2等等。
SELECT supplIEr_city
FROM supplIEr
WHERE supplIEr_name = 'IBM'
ORDER BY 1 DESC;
This would return all records sorted by the supplier_city field in descending order, since the supplier_city fIEld is in position #1 in the result set.
譯:這樣會以supplier_city的降序返回所有結果,因為supplIEr_city在結果集中的位置是#1。
Example #4
SELECT supplier_city, supplIEr_state
FROM supplIEr
WHERE supplIEr_name = 'IBM'
ORDER BY supplier_city DESC, supplIEr_state ASC;
This would return all records sorted by the supplier_city field in descending order, with a secondary sort by supplIEr_state in ascending order.
譯:返回以pt">supplier_city為降序、supplIEr_state為二級升序的結果。