如何对INT型的数据求平均值,并且求出来的数值是它四舍五入后的数值? select avg(列) from 表 where datediff(month,时间,getdate())=0 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select CONVERT(varchar(10), getDate(),120) --不要时间2002-1-1select convert(char(8),getdate(),112) ----20020101select convert(char(8),getdate(),108) ---06:05:05select avg(列) from 表 where CONVERT(varchar(7),时间,120)='2003-11' select cast(round(80*1.0/30,0) as int)select cast(round(avg(字段*1.0),0) as int) from 表 select cast(round(avg(字段*1.0),0) as int) as avg where convert(varchar(6),date,112)='200310' 1: select cast(80*1.0/30+0.5 as int)2: select cast(round(80*1.0/30,0) as int) ORDER BY 无法有效排序 求助:一个删除相同记录的语句。。 统计每个月第一个星期人数 谁能给我 讲讲 sql 中实现存储过程的知识?? 关系演算不能再sql得监视器里编辑运行吗? 雪地裸体跪求 图书借阅表的触发器该怎么写啊 安装问题(急急急急急!) ~~~~~~~sql数据库的安全问题~~~~ 用什么方式实现自动在ODBC中注册数据库文件? 100分大相送!!!平均有500个用户连接数据库,这样的连接数,服务起该怎么配置啊!十万火急!!! 向大力请教:多个数据表的复杂合并?谢谢! 我的sql server2000启动有问题
select convert(char(8),getdate(),112) ----20020101
select convert(char(8),getdate(),108) ---06:05:05select avg(列) from 表 where CONVERT(varchar(7),时间,120)='2003-11'
2: select cast(round(80*1.0/30,0) as int)