Use SYSTEM_USER as a default value : SYSTEM_USER « System Functions « SQL Server / T-SQL Tutorial






8> CREATE TABLE FunctionEx
9> (EntryDBUser varchar(128) DEFAULT SYSTEM_USER)
10> GO
1>
2>
3> drop table FunctionEx;
4> GO








25.59.SYSTEM_USER
25.59.1.Reporting Current User and Login Context
25.59.2.select SYSTEM_USER
25.59.3.Use SYSTEM_USER as a default value