------解决方案-------------------- Select A,B,C,D,E From Tb Where IsNull(D,'')<>'' Or IsNull(E,'')<>''
------解决方案-------------------- select * from Client where ClientId=1 or ClientCompany=23 ?
LZ最好说明你想得到怎样的结果
------解决方案--------------------
SQL code
select * from Client where ClientId=1 or ClientCompany=23
------解决方案-------------------- 楼主的问题看不明白
------解决方案--------------------
if object_id('Client') is not null drop table Client
go
create table Client(ClientId int,ClientCompany varchar(10) )
insert into Client
select 1,'ABC' union all
select 2,null union all
select null,'fas' union all
select 3,'' union all
select null,null union all
select null,''
select * from Client where isnull(ClientId,'')<>'' or isnull(ClientCompany,'')<>''
--结果
ClientId ClientCompany
-------- -------------
1 ABC
2 NULL
NULL fas
3
------解决方案-------------------- 每天回帖即可获得10分可用分
------解决方案--------------------