sql中如何判断某个表中的一个字段的值是不是在另一个表中的某个字段的值中包含 是如何解决

[复制链接]
查看11 | 回复3 | 2017-5-21 13:40:08 | 显示全部楼层 |阅读模式
oracle语法select * from A where not exists(select 1 from B where instr(',' || B.namelist || ',',a.name)>0;sql语法select * from A where not exists(select 1 from B where charindex(a.name,',' + B.namelist + ',')>0;GOOD LUCk...
回复

使用道具 举报

千问 | 2017-5-21 13:40:08 | 显示全部楼层
select A.* FROM A WHERE exists (select * from B WHERE namelist like '%令狐冲%')...
回复

使用道具 举报

千问 | 2017-5-21 13:40:08 | 显示全部楼层
就是用http://zhidao.baidu.com/question/351462964.html?quesup2&oldq=1这个内置函数来判断就可以啦...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行