同意 use hhh select * from 销售总表 where 地址 like '%深圳%'use hhh select * from 销售总表 where 地址 not like '%深圳%'use hhh select * from 销售总表 where 地址 is null
我觉得你是不是高错了 create table a ( a char(20), aa int not null)insert into a values('a',1) insert into a values('a',2) insert into a values('b',1) insert into a values('',1) select * from a where a like '%a' union select * from a where a not like '%a'
from 销售总表
where 地址 is null
再加一下
use hhh
select *
from 销售总表
where 地址 like '%深圳%'use hhh
select *
from 销售总表
where 地址 not like '%深圳%'use hhh
select *
from 销售总表
where 地址 is null
create table a
(
a char(20),
aa int not null)insert into a values('a',1)
insert into a values('a',2)
insert into a values('b',1)
insert into a values('',1)
select * from a
where a like '%a'
union
select * from a
where a not like '%a'