Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 [] around my column name

Author  Topic 

kirknew2SQL
Posting Yak Master

194 Posts

Posted - 2007-10-08 : 15:36:29
I have created a table and given a column the name:
ListID_ FacilityType

When I look in the property list for the table I see the name is in []. I thought that ment the name was using a reserver word.

1. Why would this name be in []?
2. I don't want any problems down streem. should i change the name?

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-10-08 : 15:47:05
it's because there's a space in your column name.

names shouldn't have spaces in them IMO. unless you like typing square brackets.


elsasoft.org
Go to Top of Page

Zoroaster
Aged Yak Warrior

702 Posts

Posted - 2007-10-08 : 15:49:26
It's because you have a space in the column name, the [ ] are just column identifiers like quotes would be.



Future guru in the making.
Go to Top of Page

kirknew2SQL
Posting Yak Master

194 Posts

Posted - 2007-10-08 : 15:50:24
Yep, that was it. Typo
thank you
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-10-08 : 22:08:06
Not only space in column name, some special characters in column name need [] also.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-10-09 : 03:45:01
I prefer using underscore in place of space

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -