问一个SQL语句问题
现在有一条数据 字段A,B,C,D,E我想查询D和E 只要他们其中有个对应的值就显示全部A,B,C,D,E
[解决办法]
Select A,B,C,D,E From Tb Where IsNull(D,'')<>'' Or IsNull(E,'')<>''
[解决办法]
select * from Client where ClientId=1 or ClientCompany=23 ?
LZ最好说明你想得到怎样的结果
[解决办法]
select * from Client where ClientId=1 or ClientCompany=23
[解决办法]
楼主的问题看不明白
[解决办法]
if object_id('Client') is not null drop table Clientgocreate table Client(ClientId int,ClientCompany varchar(10) )insert into Clientselect 1,'ABC' union allselect 2,null union allselect null,'fas' union allselect 3,'' union allselect null,null union allselect null,''select * from Client where isnull(ClientId,'')<>'' or isnull(ClientCompany,'')<>''--结果ClientId ClientCompany-------- -------------1 ABC2 NULLNULL fas3
[解决办法]
每天回帖即可获得10分可用分
[解决办法]