SQL查询问题!!

xulovewei 2003-09-11 07:09:44
在SQLserver中怎样实现日期型比较,例如比较当前时间的年月日与数据库中类型为datetime类型的数据比较,在access 中用"select * from rc_info where year(rc_date)="&year(date)&" and month(rc_date)="&month&" and day(rc_date)="&day(date)&""
问在sql server中怎样实现以上功能。
...全文
26 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
yyy431706 2003-09-11
  • 打赏
  • 举报
回复
这样可以,你自己试试别的,我现在网吧,不能帮你试了
chinesun 2003-09-11
  • 打赏
  • 举报
回复
"select * from rc_info where year(rc_date)='"&year(date)&"' and month(rc_date)='"&month&"' and day(rc_date)='"&day(date)&"'"

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧