常见sql查询语句
2012-04-15 01:29
260 查看
选择: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
原文地址:http://www.51zzl.com/dnwl/SQL.asp
插入: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
原文地址:http://www.51zzl.com/dnwl/SQL.asp
相关文章推荐
- 常见sql语句查询--学习笔记
- 常见sql查询语句(二)---高级查询
- Sql常见问题总结二(Sql语句怎么样查询IP,游标去重复,各种函数使用,各种取时间格式,字符串精确排序,超时锁问题)
- 你必须掌握的一些常见的SQL语句,包含单表查询、高级查询(连接查询、复合条件查询、嵌套查询)
- 几种常见复合sql查询语句的linq写法[继续补充中]
- 你必须掌握的一些常见的SQL语句,包含单表查询、高级查询(连接查询、复合条件查询、嵌套查询)
- 你必须掌握的一些常见的SQL语句,包含单表查询、高级查询(连接查询、复合条件查询、嵌套查询)
- 分享一些常见的SQL语句,包含单表查询、高级查询(连接查询、复合条件查询、嵌套查询等)。
- 几种常见复合sql查询语句的linq写法[继续补充中]
- Sql常见问题总结二(Sql语句怎么样查询IP,游标去重复,各种函数使用,各种取时间格式,字符串精确排序,超时锁问题)
- SQL查询语句之UNION常见错误
- oracle数据库查询Sql语句是否使用索引及常见的索引失效的情况
- Oracle 子查询等常见的sql语句
- 常见的sql查询语句
- 几条常见的数据库分页 SQL 语句
- SQL语句小例(多表查询)
- mysql按年度、季度、月度、周、日统计查询的sql语句
- SQL 优化SQL查询:如何写出高性能SQL语句
- 关于“怎么比较两个SQL查询语句产生的结果集是否相同”搜集到的一些资料
- SQL-Server 这个查询语句怎么写?