Get Host Name And User Name In SQL Server

Using below query you can get the host name and logged user name.

Syntax

  1. SELECT HOST_NAME() AS Host_Name, SUSER_NAME() [User_Name]   

Example
 
 
Ebook Download
View all
Learn
View all