我们可以在SQL Server中创建一个功能是确定的,不准确的CLR?
CREATE FUNCTION ufn_max_smalldatetime ()
RETURNS SMALLDATETIME
WITH SCHEMABINDING
AS
BEGIN
RETURN CAST('2079-06-06' AS SMALLDATETIME)
END
我们可以在SQL Server中创建一个功能是确定的,不准确的CLR?
CREATE FUNCTION ufn_max_smalldatetime ()
RETURNS SMALLDATETIME
WITH SCHEMABINDING
AS
BEGIN
RETURN CAST('2079-06-06' AS SMALLDATETIME)
END
据我所知,SQL Server确定自身的功能是否是确定性的和/或精确。 尝试运行以下查询,看看你会得到什么:
SELECT OBJECTPROPERTYEX(OBJECT_ID('dbo.ufn_max_smalldatetime'), 'IsDeterministic')
SELECT OBJECTPROPERTYEX(OBJECT_ID('dbo.ufn_max_smalldatetime'), 'IsPrecise')