最新消息:iOS编程开发交流群(6906921) ,Mac.Cocoa开发交流群(7758675) 欢迎iOS/macOS开发编程爱好及学习者加入!

sql语句检测程序到期时间

数据库 天狐 10519浏览 0评论
create table js(
name varchar(30) primary key,
starttime smalldatetime default getdate(),
endtime smalldatetime default  getdate()+5
)

insert into js (name)values ('a')

--定义一个作业,一天跑一次,假设你定义了作业,那么执行的sql是

select * from js where endtime <=getdate()    查询出数据,就过期

转载请注明:天狐博客 » sql语句检测程序到期时间

微信 OR 支付宝 扫描二维码
为天狐 打赏
非常感谢你的支持,哥会继续努力!
发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址