Thursday, 27 June 2013

Check wheather a table is present in database or not

IF object_id('tbl23', 'U') is not null
    PRINT 'Present!'
ELSE
    PRINT 'Not accounted for'

No comments:

Post a Comment