指令 | MySQL | MSSQL | Oracle |
CREATE TABLE | CREATE TABLE table_name (column1 datatype, column2 datatype, ...); | CREATE TABLE table_name (column1 datatype, column2 datatype, ...); | CREATE TABLE table_name (column1 datatype, column2 datatype, ...); |
INSERT INTO | INSERT INTO table_name (column1, column2, ...) VALUES (value1, value2, ...); | INSERT INTO table_name (column1, column2, ...) VALUES (value1, value2, ...); | INSERT INTO table_name (column1, column2, ...) VALUES (value1, value2, ...); |
SELECT | SELECT column1, column2, ... FROM table_name; | SELECT column1, column2, ... FROM table_name; | SELECT column1, column2, ... FROM table_name; |
UPDATE | UPDATE table_name SET column1 = value1, column2 = value2 WHERE condition; | UPDATE table_name SET column1 = value1, column2 = value2 WHERE condition; | UPDATE table_name SET column1 = value1, column2 = value2 WHERE condition; |
DELETE | DELETE FROM table_name WHERE condition; | DELETE FROM table_name WHERE condition; | DELETE FROM table_name WHERE condition; |
CREATE INDEX | CREATE INDEX index_name ON table_name (column1, column2, ...); | CREATE INDEX index_name ON table_name (column1, column2, ...); | CREATE INDEX index_name ON table_name (column1, column2, ...); |
DROP TABLE | DROP TABLE table_name; | DROP TABLE table_name; | DROP TABLE table_name; |
USE database_name | USE database_name; | USE database_name; | USE database_name; |
SHOW TABLES | SHOW TABLES; | SHOW TABLES; | SHOW TABLES; |
DESCRIBE table_name | DESCRIBE table_name; | DESCRIBE table_name; | DESCRIBE table_name; |
EXIT | EXIT; | EXIT; | EXIT; |
來源 | |||
https://github.com/jarsonX/Learning_SQL | |||
https://github.com/bhongy/go-web-programming-book | |||
https://xspdf.com/resolution/10388651.html |