SQL SERVER – Identifiers As Valid Object Names

Previous I wrote blog post about SQL SERVER – Explanation and Example Four Part Name. It was explaining the new feature of SQL Server 2005 of Schema. Few days ago I received email from Chi-Ho, Min of Taiwan, he suggested that he was successfully able to use column without completely specifying all the parts but just using servername…tablename. Please note the three dots (.) between servername and table.

It was interesting what Chi-Ho observed so I decided to share with all of you. Please visit SQL SERVER – Explanation and Example Four Part Name for basic understanding of the four part name. Server, database or owner/schema names are known as qualifiers of the object name. Object does not need to have all three qualifiers when refered. Most of the time objects are refered without servername qualifier as that defaults to local server.

The qualifiders can be omitted by using simple dot too. There are few valid forms of object which are listed here. An object name that specifies all four parts is known as a fully qualified name.

One thought on “SQL SERVER – Identifiers As Valid Object Names”

I got a query which has around 5 Union all’s
It is having duplicates, but I am not able to figure it out which query amongst all is leading to duplicates. One of my friend suggested to apply identifiers to each
query but I have no idea how to do that …any suggestions

Community Initiatives

About Pinal Dave

Pinal Dave is a Pluralsight Developer Evangelist. He has authored 11 SQL Server database books, 17 Pluralsight courses and have written over 3200 articles on the database technology on his blog at a http://blog.sqlauthority.com. Along with 11+ years of hands on experience he holds a Masters of Science degree and a number of certifications, including MCTS, MCDBA and MCAD (.NET). His past work experiences include Technology Evangelist at Microsoft and Sr. Consultant at SolidQ. Follow @pinaldave
Send Author Pinal Dave
an email at pinal@sqlauthority.com

Email Subscription

Enter your email address to subscribe to this blog and receive notifications of new posts by email.