Some System Functions
System function provide a method of querying the system tables of SQL server.
Function | Definition |
HOST_ID() |
Returns the current host process ID number of a client process |
HOST_NAME() |
Return the current host computer name of a client process |
SUSER_SID (['login_name']) |
Return the user's login name corresponding to the user's security identification number |
USER_ID(['name_in_db']) |
Return the database identification corresponding to the username |
USER_NAME(['user_id']) |
Return the user name corresponding to the database identification number |
DB_ID (['db_name']) |
Return the database ID number of the database |
DB_ID (['db_name']) |
Return the database ID number of the database |
DB_NAME(['db_id']) |
eturns the database name |
OBJECT_ID ('objname') |
Returns the database object ID number |
OBJECT_NAME('object_id') |
Returns the database object name |