日期:2014-05-18  浏览次数:20508 次

MS SQL中如何判断,例如,字符'FLEX'是否存在于表EMPLOYER的NAME字段中?
如题.谢谢回答!

------解决方案--------------------
select * from EMPLOYER where charindex( 'flex ',name)> 0
------解决方案--------------------
if exists (select 1 from employer where charindex( 'FLEX ',name)> 0)
print '存在 '
else
print '不存在 '
------解决方案--------------------
你的认为也行