if exists(select 1 from 目标表 where ...)
print '有'
else
print '无'