请帮我看看这个语句怎么写,谢谢 select dhhm from a where exists(select 1 from b where [user]='zs' and a.sbh like '%'+sbh_s+'%') 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 try:Select dhhm from a join b on charindex(b.sbh_s,a.sbh) > 0where b.user = 'zs' 或:select dhhm from a where exists(select 1 from b where [user]='zs' and charindex(sbh_s,a.sbh)>0) SQL2000下不能运行,说语法错误 我实在是太弱了,问个SQL。。 SQL查询语句 怎么高效的在数据库中一次添加多条记录? 查询优化 连接数据库的奇怪的问题,高分答谢 复杂的查询语句 三表显示问题,在线等 数据库附加失败!!!!! sql server 里的自动加一的类型是哪一个? sql中有没有类似idle的等待函数?----等几个问题 请问高手,要是想用一句SQL语句实现如果记录存在则更新,如果不存在则插入,怎么做?
Select dhhm from a
join b on charindex(b.sbh_s,a.sbh) > 0
where b.user = 'zs'
select dhhm from a where exists(select 1 from b where [user]='zs' and charindex(sbh_s,a.sbh)>0)