SQL HOST_NAME

The SQL HOST_NAME is one of the System Functions, which will return the Workstation name. The syntax behind this is

HOST_NAME()

HOST_NAME Example

The code snippet below will show you the SQL Server Workstation name. Please refer to the SQL HOST_ID article from our SQL tutorial page.

SELECT HOST_NAME() AS 'Workstation Name'
HOST_NAME Example
Categories SQL