Basic Sorting
メニューを表示するにはスワイプしてください
Note
The rows fetched by a
SELECTstatement are ordered by default based on the date and time of insertion, with the oldest inserted row at the top and the most recently inserted row at the bottom. In the upcoming sections, we will learn how to insert rows into tables.
Summary:
- We can sort the results of a
SELECTstatement by using anORDER BYclause; - The syntax of the
ORDER BYclause is:ORDER BY column_name [ASC|DESC]; - The keywords
ASCorDESCcan be optionally used to specify the sorting order; - Usage Example:
SELECT * FROM students ORDER BY age DESC.
1. Which clause can be used for ordering the retrieved data?
2. What is the correct syntax for using the ORDER BY clause?
すべて明確でしたか?
フィードバックありがとうございます!
セクション 3. 章 1
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください
セクション 3. 章 1