--cCellPhone<>null
--这种判断是无效的。DECLARE @cCellPhone VARCHAR(20)
SET @cCellPhone=NULLIF(@cCellPhone=null)
SELECT '为空'
ELSE
SELECT '不等于空'
/*
不等于空
*/
解决方案 »
- 帮看下这个存储过程怎样优化。
- 设计一个网上论文评价系统:一篇论文需要很多人来评价,一个人要评价很多文章,需要建几张表效率比较高?数据表间的逻辑如何?怎样连结传递数据?
- 多系统通行证的问题
- 关于触发器,想不通
- 如何设置自动编号的深入浅出的问题??
- 如何将一表中某字段全部数据导入到该该表中另一字段,两字段数据类型相同
- 变化表结构问题
- 这段sql语句把我看晕了,大大帮忙解答一下~!
- 关于osql或isql登录时的一个小问题!
- 分组,对某列求最大/最小值...问题是,同时要取得对应该最大/最小值对应行的另一列,该最大/最小值出现的时间.
- 这个查询如何设计
- 请问SQL命令能实现查询的超长结果自动换行显示吗.
from tb_CustomerHistory
where 1 <> 1
or (curl is not null and cURL = @URL)
or (cAccount is not null and cAccount = @Account)
or (cCompany is not null and cCompany = @Company)
or (cCellPhone is not null and cCellPhone = @CellPhone)
or (cEmail is not null and cEmail = @Email)
where (cAccount=@Account or @Account is null)
and (cCompany =@Company or @Company is null)
and (cCellPhone=@CellPhone or @CellPhone is null)
and (cEmail=@Email or @Email is null)
and (cURL=@URL or @URL is null )/code]
where (cAccount=@Account or @Account is null)
and (cCompany =@Company or @Company is null)
and (cCellPhone=@CellPhone or @CellPhone is null)
and (cEmail=@Email or @Email is null)
and (cURL=@URL or @URL is null )