System Functions

System functions return information about the database. Many provide a shorthand way to query the system tables.

When the argument to a system function is optional, the current database, host computer, server user, or database user is assumed. With the exception of user, system functions are always used with parentheses, even if the argument is NULL.

For example, to find the name of the current user, omit the argument, but include the parentheses. For example:
select user_name()
-------------------
dbo