求助单表查询问题 select productfrom productwhere unit in('001','003')group by producthaving count(*)=2 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 --通用的declare @unit varchar(100)set @unit='001,003'select productfrom productwhere charindex(','+unit+',',','+@unit+',')>0group by producthaving count(*)=len(@unit)-len(replace(@unit,',',''))+1 如果我输入unit001只需要检索出product0002,怎么写呢? C语言在数据库中执行 关于varchar(max), nvarchar(max)和varbinary(max) 中拆分字符串函数 请问,如果源数据库出现用户错误,还可将源数据库恢复到创建快照时的状态吗? 求教内连接和左连接以及右连接的应用区别 我用SQL2005 为什么提示我对象名称×××无效啊?编码任务很急,等各位啊 随机产生不重复的数?? 请zjcxc(邹建)及所有高手帮忙,关于MSDE的问题!! 还原数据的问题 SQL拼接字符串 简单小问题 拒绝访问,急!!! sql通过,access出错,应该怎么写
set @unit='001,003'select product
from product
where charindex(','+unit+',',','+@unit+',')>0
group by product
having count(*)=len(@unit)-len(replace(@unit,',',''))+1
只需要检索出product0002,怎么写呢?