TB_NAME:表名;COLUMN:字段,列名;CODE:条件;
查询语句:select;
(1)SELECT * FROM TB_NAME;
(2)SELECT COLUMN FROM TB_NAME;
(3)SELECT COLUMN FROM TB_NAME WHERE COLUMN1=.. AND/OR COLUMN2=..;
(4)SELECT COLUMN FROM TB_NAME WHERE (COLUMN1=..AND/OR COLUMN2=..) OR/AND COLUMN3=..;
DML(data manipulation language)语句:insert ,delete,update;
对数据进行操作。
INSERT:
(1)INSERT INTO TB_NAME(COLUMN1,COLUMN2,)
VALUES(.. , ..);
(2)INSERT INTO TB_NAME(COLUMN1,COLUMN2,)
VALUES(.. , ..),(.. , ..)...;
没有的COLUMN一般默认为null;
DELETE:
(1) DELETE FROM TB_NAME;
(2)DELETE FROM TB_NAME WHERE CODE1;
(3)DELETE FROM TB_NAME WHERE CODE1 AND/OR CODE2;
UPDATE:
(1)UPDATE TB_NAME SET COLUMN1=VALUE1;
(2)UPDATE TB_NAME SET COLUMN1=VALUE1, COLUMN2=VALUE2...;
(3)UPDATE TB_NAME SET COLUMN1=VALUE1 WHERE CODE1;
(4)UPDATE TB_NAME SET COLUMN1=VALUE1, COLUMN2=VALUE2... WHERE CODE1 AND/OR CODE2;