求一个sql语句 列A字段中含有1或2或3,列B字段是:甲、乙、丙,如何进行对照,1对应甲,2对应乙,3对应丙,找出没有对应上的数据。A B阿1# 甲去2限 乙过2 丙得到最后一行。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select *from tabwhere not (a like '%1%' and b='甲' or a like '%2%' and b='乙' or a like '%3%' and b='丙')给的数据怎么这么晕 select * from tbexceptselect * from tbwhere (a=1 and b='甲' ) or (a=2 and b=b='乙' ) or (a =3 and b='丙') select * from tb where not B=case when charindex('1',A,1)>0 then '甲' when charindex('2',A,1)>0 then '乙' when charindex('3',A,1)>0 then '丙' end SQL不能装在三核CPU机子上,不支持 查询小数点位数 dts导入数据不完整 怎样删除表中列的unique属性?急 在存储过程里怎么把 sql_variant 转换成 uniqueidentifier ? 求一SQL查询语句 怎么才可能把一个存储过程导出为xls文件。 xp上 安装sql server 2000的个人版的 问题 SQL 根据参数传递来判断是否将某一字段作为查询条件,实现选择性条件查询 能不能把下面的过程简化和性能优化 如何在SQL语句中得到类似VB中 format(a,"000000")那样的结果? sql如何通过xp_cmdshell执行FTP的命令
from tab
where not (a like '%1%' and b='甲' or a like '%2%' and b='乙' or a like '%3%' and b='丙')
给的数据怎么这么晕
except
select * from tb
where (a=1 and b='甲' )
or (a=2 and b=b='乙' )
or (a =3 and b='丙')
when charindex('2',A,1)>0 then '乙'
when charindex('3',A,1)>0 then '丙' end