IF OBJECTPROPERTY ( object_id('tablename'),'ISTABLE') = 1 print 'table is exists'else create table tablename()