gpt4 book ai didi

sql-server - T-SQL : What does this passage in the COALESCE documentation mean?

转载 作者:行者123 更新时间:2023-12-03 02:13:50 24 4
gpt4 key购买 nike

ISNULL and COALESCE though equivalent, can behave differently. An expression involving ISNULL with non-null parameters is considered to be NOT NULL, while expressions involving COALESCE with non-null parameters is considered to be NULL.

http://msdn.microsoft.com/en-us/library/ms190349.aspx

最佳答案

它确定使用 ISNULL 或 COALESCE 的计算列的可为空性

RowCheckSum AS COALESCE(...)

...意味着 RowCheckSum 列定义具有 NULL 关键字,并且

RowCheckSum2 AS ISNULL(...)

...具有 NOT NULL 定义。

这也意味着,在结果集中,第一个字段可以返回 NULL 值,而第二个字段则不能。

关于sql-server - T-SQL : What does this passage in the COALESCE documentation mean?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4524126/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com