Dzwebs.Net

撰写电脑技术杂文十余年

Sql精妙语句--各种求值函数

Admin | 2007-10-10 22:27:18 | 被阅次数 | 7689

温馨提示!

如果未能解决您的问题,请点击搜索;登陆可复制文章,点击登陆

查找: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
根据已有的表创建新表:
A:create table tab_new like tab_old (使用旧表创建新表)
B:create table tab_new as select col1,col2… from tab_old definition only


该杂文来自: 数据库Sql,VFP,Access

上一篇:sql***insert语句,删除语句,各种统计函数

下一篇:Sql行列转换代码

网站备案号:

网站备案号:滇ICP备11001339号-7

版权属性:

Copyright 2007-2021-forever Inc. all Rights Reserved.

联系方式:

Email:dzwebs@126.com QQ:83539231 访问统计