Retrieve Client PC or Workstation name (T-SQL)

Send Us a Sign! (Contact Us!)
Text

A very useful function called HOST_NAME is available in T-SQL which will give you the workstation name from where the data modification request was initiated. Following is the example of usage:

[tweet]

SELECT HOST_NAME() AS HOST_NAME

Since it is a system function, you can use it as a Default value for your column to always store the Workstation name.

SOURCE

LINK

LANGUAGE
ENGLISH

1 thought on “Retrieve Client PC or Workstation name (T-SQL)”

Comments are closed.