一个感觉很简单的SQL却写不出来,请帮忙.. select * from tb where id not in('1','3') 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 flag is not null select * from tb where flag<>'' select * from tb where flag='' and flag is nullmodify select * from tb where flag='' or flag is null 汗,and 用错了. 就是 一行记录中 有personid 为1 flag 为1,2,3可以看出personid 在 flag中是存在的.也就是判断,如果personid在flag中存在,就把该行的记录过滤掉. select * from tb where charindex(personid,flag)>0 select * from tablename where charindex(cast(personid as varchar)+',',flag)>0 or charindex(','+cast(personid as varchar),flag)>0 select * from tb where charindex(personid,flag)<=0 请问哥哥如何在SQL中增加一个字段 大哥门帮忙一下 帮忙看看这个存储过程 如何最简单的执行一个sql脚本? 菜鸟问题:下面这种情况可能吗?在线结贴 一个高难度的触发器,多阶BOM的成品单价如何自动生成 这样的过程问题怎么解决呀? 各位兄台,關于一對多操作 如何处理SQL Server的CPU占用率过高的问题? 请教sqlserver配置 被注入病毒代码的问题 sql 查询问题
flag is not null
modify
汗,and 用错了.
可以看出personid 在 flag中是存在的.
也就是判断,如果personid在flag中存在,就把该行的记录过滤掉.
select * from tb where charindex(personid,flag)<=0