I am working on modifying the existing SQL Server Stored Procedure. I added two new columns to the table and modified the stored procedure as well to select these two column
If you are going to ALTER Table column and immediate UPDATE the table including the new column in the same script. Make sure that use GO
command to after line of code of alter table as below.
ALTER TABLE Location
ADD TransitionType SMALLINT NULL
GO
UPDATE Location SET TransitionType = 4
ALTER TABLE Location
ALTER COLUMN TransitionType SMALLINT NOT NULL