[email protected]
现在表table中有个字段是desc
现在若干条记录,这些记录中任何一条的desc字段中包含字符串PE,[email protected]
求此赋值语句
------解决方案--------------------
if exists(select 1 from [table] where charindex( 'PE ',[desc])> 0)
set @flag=1
------解决方案--------------------
if exists (select * from 表名 where [desc] like '%PE% ')
set @flag=1