I want to update month in my database by adding 1 month but I don’t know how I want to add month in my following stored procedure query I am not good in sql kindly check it
ALTER PROCEDURE [dbo].[ChangePassword]
@password varchar(20),
@epassword varchar(50),
@username char(32)
AS
UPDATE AccountRole
SET Password = @password,
EPassword = @epassword
WHERE UserName = @username
UPDATE AccountRole
SET ExpiryDate="?"
Hhere what do I have to write to increment 1 month when query executes
To increment an existing value of type
DATETIMEorDATEby one month, use:and as Oleg rightfully pointed out, assuming that your two
UPDATEstatements have the sameWHEREcondition (WHERE UserName = @username), then you could do this in a singleUPDATE: