怎样查询ClassId在ClassList中 我现在有两个字段 ClassId ClassList 我现在ClassId是知道的,怎样写SQL 条件就是ClassId在ClassList中 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from tb a,tb b where a.ClassId=b.ClassList select * from tb t where exists(select 1 from tb where ClassId=a.ClassList) select * from tb where ClassId in (select ClassList from tb) select * from tb where ClassId in (select ClassList from tb)select m.* from tb m where exists(select 1 from tb n where n.ClassList = m.ClassId) 如果classidlist 中的classid 是用 逗号 分隔的话:where charindex(','+classid+',',','+classidlist+',')>0 我的ClassList是数据库中的,而ClassId不是数据库中的 用一些实例告诉我们,你的 classid 和 classidlist 分别长什么样儿. ClassId :201112021228458593ClassList:201112021228458593,201112021229246875, 求两个简单的sql语句 同一条记录不同字段求和并且输出的问题 SQL Server 2008 启动报错,错误号:17058 数据库使用和备份时报错(求高手解决) sql 查询-更新 阻塞。。。。? 如何在触发器里通过“,”逗号分割取得每个字符串? 数据查询,帅选的问题? SQL补数据问题 改了windows2000 administrer的密码后就连不通本机的sql_server,该如何做? 请问用户自定义的函数能不能作为字段的默认值 请问这段语句什么意思 ??? 求一个关联表的统计语句
select * from tb where ClassId in (select ClassList from tb)
where charindex(','+classid+',',','+classidlist+',')>0
ClassList:201112021228458593,201112021229246875,