开发者

SQLite Update date SQL

开发者 https://www.devze.com 2022-12-19 05:38 出处:网络
SQLite Newbie I am trying to update a table with a开发者_如何学运维 date. Something like this:

SQLite Newbie

I am trying to update a table with a开发者_如何学运维 date.

Something like this:

Update MyTable Set MyCol=GetDate()

What is the correct syntax?


 UPDATE table SET datecol=date('now')

This'll set the whole table to the date now.

 UPDATE table SET datecol=date('now') WHERE id=666

Or if it's a datetime column, datetime('now')


You have a complete reference here.

To update to the current date/time do this:

update mytable set mycol=date('now')


time Update According to below Query But One Query How Update Both Date And Time?

UPDATE mytable SET mycol=Time('now')
0

精彩评论

暂无评论...
验证码 换一张
取 消