Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So, apparently you can't name a table Trigger in SQLServer. Someone in my office found out the hard way porting an application from MySQL, I'm suspicious of whether or not that's a valid table name in MySQL either.

Is there a list of invalid table (or object) names in SQLServer? Is it just all the keywords? I'd imagine SELECT select FROM isn't valid. Is there ever a case where merely adding an underscore to the end of a keyword would still produce an invalid table (or object) name in SQLServer?

Question is in reference to SQLServer 2000 and up, but mainly 2005 and 2008

share|improve this question
up vote 2 down vote accepted

I believe you can use SQL server reserved words as object names as long as you wrap them in square brackets:
Select [select] from [select]

However, I would NOT recommend this, and stay away from naming any SQL server objects after reserved names (or words that might be reserved in the future).

There was a list of these words in the SQL server documentation, they are on MSDN.

share|improve this answer
Thanks that helps a lot, now I need to take a big long grep – Peter Turner Oct 24 '12 at 18:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.