Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Basic Sorting | Sorting Data
Introduction to SQL

bookBasic Sorting

メニューを表示するにはスワイプしてください

Note

The rows fetched by a SELECT statement 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 SELECT statement by using an ORDER BY clause;
  • The syntax of the ORDER BY clause is: ORDER BY column_name [ASC|DESC];
  • The keywords ASC or DESC can 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?

question mark

Which clause can be used for ordering the retrieved data?

正しい答えを選んでください

question-icon

What is the correct syntax for using the ORDER BY clause?

クリックまたはドラッグ`n`ドロップして空欄を埋めてください

すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 3.  1

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

セクション 3.  1
some-alt