use pubs go if exists(select 1 from information_schema.tables where table_name = 'jobs') print 'jobs table exists' else print 'jobs table does not exist' go