基本sql常用的语法,不经常用sql,备忘
2010-02-22 12:41
246 查看
选择:select * from table1 where 范围
插入:insert into table1(field1,field2) values(value1,value2)
删除:delete from table1 where 范围
更新:update table1 set field1=value1 where 范围
查找:select * from table1 where field1 like ’%value1%’ ---like的语法很精妙,查资料!
排序:select * from table1 order by field1,field2 [desc]
总数:select count * as totalcount from table1
求和:select sum(field1) as sumvalue from table1
平均:select avg(field1) as avgvalue from table1
最大:select max(field1) as maxvalue from table1
最小:select min(field1) as minvalue from table1
取出前N个:select top n field1 from table1
reference:/article/5379915.html
插入:insert into table1(field1,field2) values(value1,value2)
删除:delete from table1 where 范围
更新:update table1 set field1=value1 where 范围
查找:select * from table1 where field1 like ’%value1%’ ---like的语法很精妙,查资料!
排序:select * from table1 order by field1,field2 [desc]
总数:select count * as totalcount from table1
求和:select sum(field1) as sumvalue from table1
平均:select avg(field1) as avgvalue from table1
最大:select max(field1) as maxvalue from table1
最小:select min(field1) as minvalue from table1
取出前N个:select top n field1 from table1
reference:/article/5379915.html
相关文章推荐
- SQL常用语法回忆及备忘之基本SQL语句
- SQL常用语法回忆及备忘之表的创建及管理 - 1
- MySQL:常用操作符、管理命令、基本SQL语法等
- 常用的SQL语句<一>基本语法和句型
- sql 存储过程 开发 常用语法记录 备忘
- MYSQL常用命令与SQL基本语法(重要操作汇总)
- SQL语句的基本常用的一些语法
- SQL基本语法
- oracle 基本语句练习(四) SQL1999 语法规范 cross join ,等值连接,不等值连接,自连接与外连接
- SQL常用语法汇总
- 常用SQL查询命令的语法
- Oracle sql常用语法
- SQL:1999基本语法(学习笔记)
- 动态sql语句基本语法
- 动态sql语句基本语法
- Java基本概念-常用sql语句
- oracle PL/SQL的基本构成,块结构和基本语法要求,数据类型,变量定义,运算符和函数
- .md即markdown文件的基本常用编写语法
- 常用的sql语法
- 《SQL语句的基本语法》 {转!!}