标签:
CREATE TABLE 语法
CREATE TABLE 表名称 ( 列名称1 数据类型, 列名称2 数据类型, 列名称3 数据类型, .... )
SQL SELECT 语法
SELECT 列名称 FROM 表名称
SELECT * FROM 表名称
INSERT INTO 语句
INSERT INTO 表名称 VALUES (值1, 值2,....)
INSERT INTO table_name (列1, 列2,...) VALUES (值1, 值2,....)
Update 语句
UPDATE 表名称 SET 列名称 = 新值 WHERE 列名称 = 某值
DELETE 语句
DELETE FROM 表名称 WHERE 列名称 = 值
WHERE 子句
SELECT column1, column2, columnN FROM table_name WHERE [condition]
ORDER BY 语句
SELECT column-list FROM table_name [WHERE condition] [ORDER BY column1, column2, .. columnN] [ASC | DESC];
GROUP BY 语句
SELECT column-list FROM table_name WHERE [ conditions ] GROUP BY column1, column2....columnN ORDER BY column1, column2....columnN
HAVING 子句
SELECT FROM WHERE GROUP BY HAVING ORDER BY
函数的语法
SELECT function(列) FROM 表
标签:
原文地址:http://www.cnblogs.com/mmyz-sysu-panjn/p/sql.html