SQL HOST_ID

SQL HOST_ID is one of the System Function, which will return the Workstation identification number.

The Workstation identification number of SQL HOST_ID is nothing but a Process ID of an application on the client computer that is connecting to SQL Server. The syntax behind this is

HOST_ID()

SQL HOST_ID Example

The below SQL HOST_ID code snippet will show you the SQL Server Workstation identification number.

SELECT HOST_ID() AS 'Workstation Number'
SQL HOST_ID Example

About Suresh

Suresh is the founder of TutorialGateway and a freelance software developer. He specialized in Designing and Developing Windows and Web applications. The experience he gained in Programming and BI integration, and reporting tools translates into this blog. You can find him on Facebook or Twitter.