一张表,其中有“时间”和“编号”两列.如果我用:
update 表名 set 时间 = '2011-02-14 08:07:23' where 编号 = 3 能正确运行.但是若我想取当前时间,用getdate()函数的话,上面这一句,该怎么写?初学sql语法,请不要见笑!
update 表名 set 时间 = '2011-02-14 08:07:23' where 编号 = 3 能正确运行.但是若我想取当前时间,用getdate()函数的话,上面这一句,该怎么写?初学sql语法,请不要见笑!
如果時間列是字符串的話就用:update TableName set 時間 = convert(varchar(20),getdate(),120) where 編號 = 3