注册 登录
编程论坛 SQL Server论坛

[求助]如何写这个查询语句?

jockey 发布于 2007-04-20 09:01, 491 次点击
有一组数据(kkk,bbb,ddd,ccc,......) ,查询在表A(Name)中是否包含,如果有满足条件则退出。


while not exists( select * from A where A.Name=
3 回复
#2
bygg2007-04-20 09:18
select count(*) from A where Name like '%,%'
#3
summoner2007-04-20 09:25
,好像不是数据的一部分吧
#4
关小彤2007-04-20 13:32

你试试这样行不行
declare @count int
declare @i int
set @count=0
while @count=0
begin
set @count=(select count(*) from A where Name like '%,%')
end

1