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 1 year has passed since last update.

SQL基礎まとめ

Last updated at Posted at 2023-09-27

備忘録

データベースとは?

データベースとは、テキストや数値などのデータを保存するためのツール。
twitterのツイートなどの情報をデータベースに保存している。

・表のことを「テーブル」
・縦の列のことを「カラム」
・横の列のことを「レコード」

クエリとは?

クエリは、データベースに送る命令のこと。
データベースからデータを取得するためには「SELECT」を用いる。
テーブルの指定は「FROM」

SQL:カラムの参照方法
SELECT name ・・・どのカラムの指定
FROM purchases; ・・・どのテーブルの指定

順番はSELECT文→FROM文の順番

クエリの最後には「;」を必ず、打つこと!!

SQL:複数カラムの参照方法
SELECT name,price ・・・どのカラムの指定(複数)
FROM purchases; ・・・どのテーブルの指定
SQL:すべてのカラムの参照方法
SELECT * ・・・すべてのカラムの指定
FROM purchases; ・・・どのテーブルの指定

編集中

0
0
0

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?