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.

  • server.database.schema_name.object_name
  • server.database..object_name
  • server..schema_name.object_name
  • server…object_name
  • database.schema_name.object_name
  • database..object_name
  • schema_name.object_name
  • object_name

Reference : Pinal Dave (http://blog.SQLAuthority.com) , BOL – Using Identifiers As Object Names

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

  1. 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


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s