Does anyone see what\'s wrong with this code for SQL Server?
IF NOT EXISTS(SELECT * FROM sys.columns WHERE Name = \'OPT_LOCK\'
The root cause of the error is the newly added column name is not reflected in the sys.syscolumns and sys.columns table until you restart SQL Server Management Studio.