LoginSignup
0
2

More than 5 years have passed since last update.

SQL文初心者まとめ

Posted at

データベース管理システムには、関係データベース管理システム(RDBMS)とNoSQLがある。RDBMSには、Oracle Database、IBM DB2、MySQL、PostgreSQLなどがある。ちなみに最後のPostgreSQLの読み方はポストグレスキューエルである。何度読んでも覚えられない。

様々なRDBMSがあるが、一般的なSQL文を自分の学習のために書く。
大まかに4つの文で命令を下す。
SQL文によって、データベース上のデータの必要なものだけ取り出したり、更新したり、ソートしたりするなどが可能になる。

検索

select hoge from fuga where piyo;

追加

insert into hoge;

更新

update hoge set fuga = 'piyo', hogera = 'moge' where moge='toto';

削除

delete from hoge where fuga='hogera';

*:該当する全てのデータを選択

0
2
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
2