开发者

Substract 1 month to update table SQL Server

开发者 https://www.devze.com 2023-04-10 07:52 出处:网络
I need to update all the issuedat (date field) to be less than one month from the column paidat (date field)

I need to update all the issuedat (date field) to be less than one month from the column paidat (date field)

ex:

if paidat = 01/02/2011 then issuedat should开发者_运维知识库 = 01/01/2011

UPDATE invoices SET invoices.issuedat = ????


UPDATE invoices SET invoices.issuedat = dateadd(MM,-1,paidat)
0

精彩评论

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

关注公众号