I have the following function.
create FUNCTION [dbo].[Valid](@c char(9))
RETURNs bit
as
begin
DECLARE @sum int = 0;
return 0
end
And the following SQL
create table test(A char(10))
alter table test add C as dbo.Valid(A) persisted;
has the error of
Msg 4936, Level 16, State 1, Line 50
Computed column 'C' in table 'test' cannot be persisted because the column is non-deterministic.