I didn't quite follow what you are trying to do, and why you are trying to do it - but could it be something like this?create procedure sp_alter_table_column (@csv_column nvarchar(max))asdeclare @str_col_main nvarchar(max), @str_col_dynamic nvarchar(max) , @str_sql varchar(max)if not exists( select * from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME='temp_main' and column_name = @csv_column )and not exists ( select * from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME='temp_dynamic' and column_name = @csv_column )begin set @str_sql = 'Alter table temp_dynamic Add Column ''' + @csv_column + ''' int NOT NULL, Desig_Id int NOT NULL'; exec @str_sqlend