• Got a Tipila, google, windows live or facebook account ?

This is how to check a column exists in tsql

if Exists(select * from sys.columns where Name = N'columnName'  
            and Object_ID = Object_ID(N'tableName'))

begin
    -- your code
end
1
votes
Login to Tipila