2013-07-08

TSQL - If object exists (table for example)

if OBJECT_ID('DATABASE_NAME_HERE.SCHEMA_NAME_HERE.TABLE_NAME_HERE', 'U') is not null
begin
       print('The table exists!');
end;


No comments:

Post a Comment