Use a UDF as the default value in a table column in SQL Server
问题 I created a scaler UDF (called sCurrentAppUser()) in SQL Server 2012 Express and I would like to use this UDF as a default value when defining a table. But every time I try, I get an error of "'sCurrentAppUser' is not a recognized built-in function name." Since I can't post more than two links yet (reputation), I'll link to my research and references in a comment. Here's my UDF: ALTER FUNCTION [dbo].[sCurrentAppUser] () RETURNS nVarChar(128) AS BEGIN DECLARE @CurrentAppUser nVarChar(128) IF