Painting Blue Code
Simple, self-explanatory code snippets.
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
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment