9月
select * from pro_ioput
where modtime between '2004-09-00' and '2004-09-30'8月
select * from pro_ioput
where modtime between '2004-08-00' and '2004-08-31'
select * from pro_ioput
where modtime between '2004-09-00' and '2004-09-30'8月
select * from pro_ioput
where modtime between '2004-08-00' and '2004-08-31'
解决方案 »
- sql xml replace value of不解之处
- ?这个网站打开这么快...是用什么数据库实现的呀?
- 一条sql可以实现?
- 石头哥,海爷,梁哥,大叔,以及隐藏的裤衩高手等牛人请进 (听说标题长的帖子点击率高)
- dat数据文件如何打开?
- 问一个ALL的运算结果问题……
- 关于数据库字段类型转换的问题
- distinct为何不能过滤到时间重复的记录?
- *****最大分,最小分,平均分查询******
- 求救各位:IIS5.0下RDS出不來............我將分全給了...........
- 谢谢你.请教一个小问题?
- 怎么能查出数据库的所有用户名单和他们的权限和最后登陆时间。《〈〈邹建〉〉》大哥进
pername basemoney modtime
陈家平 100 2004-09-21
林爱铃 200 2004-09-22
林名 200 2004-08-21
林明 150 2004-07-05你的记录每条是什么意思??是每个人每天的工资,还是月工资?
也就是说这些记录是怎么产生的?
from pro_ioput
group by convert(char(7),modtime,120)
当然如果有更好的方法,欢迎你的慷慨!
select * from pro_ioput a
where modtime=(select max(modtime) from pro_ioput where name=a.name and modtime<'2004-10-1')8月:
select * from pro_ioput a
where modtime=(select max(modtime) from pro_ioput where name=a.name and modtime<'2004-9-1')解释清楚些,要不不同人有不同理解
where datediff(month,modtime,getdate())=1
select * from pro_ioput where year(modtime)=2004 and month(modtime)=8
--September
select * from pro_ioput where year(modtime)=2004 and month(modtime)=9
select * from pro_ioput
where datediff(month,modtime,getdate())=1
是我想要的结果,谢谢大家!