0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

検索結果の加工

Last updated at Posted at 2021-10-17

今回はSELECT文で取得したデータの加工方法をまとめます!

加工内容         キーワード
重複行を除外する DISTINCT
結果を並び替える ORDER BY
行を限定して取得する OFFSET FETCH
結果を集合演算する UNION,EXCEPT,INTERSECT


・SELECT DISTINCT 〇〇 FROM 〇〇
・SELECT * FROM 〇〇 ORDER BY DESC

のように、DISTINCTのみSELECT文の最初の方に記述するので気をつけてください!
ちなみに、DESCとは検索結果を降順に並び替えるために使用します。

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?