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?

SELECT文

SELECTCRUDにおけるReadにあたるもの

基本

使用方法

SELECT column_name FROM table_name;

解説

column_name:カラム名、データを入れる箱の名前
table_name:テーブル名、カラムという箱をたくさん入れた部屋の名前

応用

全件取得

ユーザーテーブルから全件を取得

SELECT * FROM user;

複数取得

ユーザーテーブルから名前と年齢を取得

SELECT name, age FROM user;

条件取得

ユーザーテーブルからjohnの年齢と住所を取得

SELECT age, address FROM user WHERE name = 'john';
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?