host_name

Description

Displays the current host computer name of the client process.

Syntax

host_name()

Parameters

None.

Examples

Example 1

select host_name()
------------------------------
violet

Usage

host_name, a system function, returns the current host computer name of the client process (not the server process).

Standards

ANSI SQL – Compliance level: Transact-SQL extension.

Permissions

Any user can execute host_name.

See also

Documentation Transact-SQL Users Guide

Function host_id