My code is
DECLARE @nextYear Integer = 0;
select @nextYear = DATEPART(yy,getdate())+1
DECLARE @nextMonth DATETIME = GETDATE();
DECLARE @mon integer = 0;
SELECT @mon = MONTH(EOMONTH ( @nextMonth, 1 ))
update Mytable set
month_of_usage = '@mon/@nextYear' where id = 1
Data type of month_of_usage is varchar. I need month of usage to be set as 11/2021. This script is meant to automatically populate data for next month.