Replaces NULL with the specified replacement value.
SyntaxISNULL(check_expression, replacement_value)Argumentscheck_expressionIs the expression to be checked for NULL. check_expression can be of any type.replacement_valueIs the expression to be returned if check_expression is NULL. replacement_value must have the same type as check_expresssion. Return TypesReturns the same type as check_expression.ResThe value of check_expression is returned if it is not NULL; otherwise, replacement_value is returned.
SyntaxISNULL(check_expression, replacement_value)Argumentscheck_expressionIs the expression to be checked for NULL. check_expression can be of any type.replacement_valueIs the expression to be returned if check_expression is NULL. replacement_value must have the same type as check_expresssion. Return TypesReturns the same type as check_expression.ResThe value of check_expression is returned if it is not NULL; otherwise, replacement_value is returned.
解决方案 »
- 在sqlserver 2000 中如何实现对多主键表中进行分页查询
- 如何用SQL语句对无符号64位整数进行运算
- 一个截取字符串的难题
- SQL 2005的SQL Server(SQLEXPRESS) 还是不能启动
- 收藏 不显示删除回复显示所有回复显示星级回复显示得分回复 高手支招:执行 update sql语句,影响行返回为1,但实际上有时数据记录并没有修改成功.
- 如何解决这种情况下的数据库文件过大问题
- 请教在存储过程中如何使用循环语句?
- 各位大虾,可不可以指点一下我如何学习数据库?
- 能向SQL SERVER2000的存储过程传一个记录集吗?
- 关于sql server 7.0收缩日志文件的问题?
- 存储过程不能插值?(100)
- 简单-请帮我看看这个存储过程哪里出错了
FOR INSERT, UPDATE, DELETE
ASSET NOCOUNT ONUPDATE zjc_plan
SET out_num=isnull(zjc_plan.out_num,0)-isnull(deleted.out_num,0)
FROM zjc_plan,deleted
WHERE zjc_plan.materials_code=deleted.materials_code and zjc_plan.contract=deleted.contractUPDATE zjc_plan
SET out_num=isnull(zjc_plan.out_num,0)+isnull(inserted.out_num,0)
FROM zjc_plan,inserted
WHERE zjc_plan.materials_code=inserted.materials_code and zjc_plan.contract=inserted.contractSET NOCOUNT OFF
else ..... end