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,
You should add schema name for that function:
CREATE TABLE [dbo].[Clients](
[ModifyingUser] [nvarchar](128) NOT NULL DEFAULT dbo.sCurrentAppUser (),
[Modification] [char](1) NULL DEFAULT 'A',
[ModifyingHost] [nvarchar](128) NOT NULL DEFAULT host_name (),
[ClientID] [uniqueidentifier] NOT NULL,
[Label] [nvarchar](1024) NULL,
CONSTRAINT [PK_Clients] PRIMARY KEY (
[ClientID] ASC
)
)