HOST_NAME
system function
What changes
- Input
- arguments or engine/session state
- Output or change
- value
- Return type
- nvarchar(128)
Syntax at a glance
HOST_NAME ()
Work example
Read the client host name reported for the session.
Read state in the intended scope and immediately after the statement it describes. Treat host values as untrusted.
Check your work A client can supply this value, so it is not a trusted device identity.
Open Microsoft Learn for full syntax, permissions, and details for your version.