if exists(select * from [order]) and exists(select * from testmodel) and exists(select * from customer) print 'yes' else print 'no'