gpt4 book ai didi

sql-server - 表 '...' 中的计算列 '...' 无法持久化,因为该列是不确定的?

转载 作者:行者123 更新时间:2023-12-05 09:12:45 24 4
gpt4 key购买 nike

<分区>

我有以下功能。

create FUNCTION [dbo].[Valid](@c char(9))
RETURNs bit
as
begin
DECLARE @sum int = 0;
return 0
end

和下面的SQL

create table test(A char(10))
alter table test add C as dbo.Valid(A) persisted;

有错误

Msg 4936, Level 16, State 1, Line 50

Computed column 'C' in table 'test' cannot be persisted because the column is non-deterministic.

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