データの追加・編集・削除 [MySQL]
データの追加 (INSERTステートメント)
INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]
[INTO] tbl_name [(col_name,...)]
VALUES ({expr | DEFAULT},...),(...),...
[ ON DUPLICATE KEY UPDATE col_name=expr, ... ]
もしくは
INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]
[INTO] tbl_name
SET col_name={expr | DEFAULT}, ...
[ ON DUPLICATE KEY UPDATE col_name=expr, ... ]
もしくは
INSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]
[INTO] tbl_name [(col_name,...)]
SELECT ...
[ ON DUPLICATE KEY UPDATE col_name=expr, ... ]
実行例
mysql> SELECT * FROM course_list;
+------------+------------------------+--------+-------+----------+
| code | name | price | lab | text |
+------------+------------------------+--------+-------+----------+
| SA-100-S10 | UNIX(Solaris10)入門 | 90000 | local | Japanese |
| SA-200-S10 | Solaris10システム管理I | 120000 | local | Japanese |
+------------+------------------------+--------+-------+----------+
2 rows in set (0.00 sec)
mysql> INSERT INTO course_list VALUES ('SA-200-S10-1','Solaris10システム管理I','120000','local','Japanese');
Query OK, 1 row affected (0.08 sec)
mysql> SELECT * FROM course_list;
+--------------+------------------------+--------+-------+----------+
| code | name | price | lab | text |
+--------------+------------------------+--------+-------+----------+
| SA-100-S10 | UNIX(Solaris10)入門 | 90000 | local | Japanese |
| SA-200-S10 | Solaris10システム管理I | 120000 | local | Japanese |
| SA-200-S10-1 | Solaris10システム管理I | 120000 | local | Japanese |
+--------------+------------------------+--------+-------+----------+
3 rows in set (0.03 sec)
オラクルユニバーシティSolaris系技術トレーニング一覧
Solarisお勧め書籍
Solaris 11.2 システムハンドブック
|
Oracle Solaris 11 試験対策本(OCA)
|