Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Get Host Name And User Name In SQL Server
WhatsApp
Pankaj Kumar Choudhary
8y
4.4
k
0
1
25
Blog
Using below query you can get the host name and logged user name.
Syntax
SELECT
HOST_NAME()
AS
Host_Name, SUSER_NAME() [User_Name]
Example
SQL Server
Up Next
Could Not Find Server 'Server Name' In sys.servers In SQL Server
Ebook Download
View all
Basics of SQL Server
Read by 1.6k people
Download Now!
Learn
View all
Membership not found