我努力了:
CAST(NULL AS DATETIME) AS Exit_T.
给我以下错误:
将 char 数据类型转换为 datetime 数据类型会导致 datetime 值超出范围。
我们可以为DateTime
字段分配空值吗?在查询达到某些条件后我需要这个
我努力了:
CAST(NULL AS DATETIME) AS Exit_T.
给我以下错误:
将 char 数据类型转换为 datetime 数据类型会导致 datetime 值超出范围。
我们可以为DateTime
字段分配空值吗?在查询达到某些条件后我需要这个
What are you trying to do? You don't typically use NULL in a cast. You would assign the keyword NULL to the value of the field. Nulls are acceptable in DateTime fields if you allow it.
如果datetime
field 是NULL
-able 字段,我们可以分配NULL
值,否则,我们不能分配NULL
值。
看看问题不在于演员阵容,而必须来自其他地方:
select CASE(NULL AS DATETIME) AS Exit_T;