日期:2014-05-17 浏览次数:20392 次
--ID,day是csdn表中的两个字段,day为日期,'2013-07-30'为你要查询的日期 select ID,day,DATENAME(weekday,day) from (select id,datename(week,day)as week,day from csdn) b where week=(select DATENAME(WEEK,'2013-07-30'))
Quote: 引用: --ID,day是csdn表中的两个字段,day为日期,'2013-07-30'为你要查询的日期 select ID,day from (select id,datename(week,day)as week,day from csdn) b where week=(select DATENAME(WEEK,'2013-07-30')) ID换成别的字段也不影响的吧
--ID,day是csdn表中的两个字段,day为日期,'2013-07-30'为你要查询的日期 select ID,day from (select id,datename(week,day)as week,day from csdn) b where week=(select DATENAME(WEEK,'2013-07-30'))