If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back  dBforums > Database Server Software > Microsoft SQL Server > <Tablename> . . <ColumnName>

LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Registered User
Join Date: Sep 2003
Posts: 15
Question <Tablename> . . <ColumnName>

What is the difference between
<Tablename> . . <ColumnName> and <Tablename> . <ColumnName>
this syntax we are using in Storedprocedures.
In SQL 2000, <Tablename> . . <ColumnName> is not working

Tablename =a
Column Name = b
Difference between a..b and a.b

Can anyone let me know.

Reply With Quote
  #2 (permalink)  
World Class Flame Warrior
Join Date: Jun 2003
Location: Ohio
Posts: 12,561
The difference would be that [Table].[Column] works, while [Table]..[Column] doesn't. At least I've never used syntax like that and I don't know of any reason why it would work.

I think you are getting this confused with table references, which may or may not include the object owner's name.

The full reference for an object (such as a table) is:

...but if the object is in the current database you can simply refer to it as

In either case, you are allowed to omit the owner. SQL Server will search first for an object owned by the current user, and if it cannot find one then it will search for an object that is owned by DBO:
If it's not practically useful, then it's practically useless.

www.chess.com: "sqlblindman"
Reply With Quote
  #3 (permalink)  
Resident Curmudgeon
Join Date: Feb 2004
Location: In front of the computer
Posts: 14,820
If you mean that your code refers to something like:
SELECT name FROM master..sysdatabases
The "master" is a database, the "sysdatabases" is a table, and the ".." implies either your own user or more likely dbo.

SQL Server has never allowed the use of tablename..columname in any circumstances that I remember.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On