How to find SQL Server Instance Name?

Use below code:

select @@SERVERNAME

Note: This presents SQL Instance name. This can be different than the actual server’s name. 


Comments