I did not specify a version of SQL Server because thus far, this particular oddity has happened on both SQL Server 2000 in Enterprise Manager and SQL Server 2008 in Management Studio.
When I write a create table script all of the reserved words that belong to SQL Server show up in Blue. Thats been a standard (words like datetime, char, nvarchar, int, primary key etc etc)
My question is why does the word 'status' show up in blue? It is not on any reserved word list that I can find. When I run the script, the table is created with no issue.
Nevertheless, I am concerned that I'm actually using a reserved word that will, at some point down the road, bite in the behind.
Has this happened to anyone else?
(I tried copying the script into this post, but the coloring did stay so I've attached exactly what it looks like in a word 2003 document)
I just put those words in square brackets. In that case even if it's a reserved word, it will not process it as a command, it will take it as a string.
It may not be a reserved word on SQL Server yet, but in some others it is, I believe the editor is pointing it out because being an ANSI keyword you may have problems with it along the way.
In this case it is an MySQL keyword: Resets most status variables to zero.
More important than the will to succeed, is the will to prepare for success.
Please rate the posts, your comments are the fuel to keep helping people
I'm moving this app from an Access backend to an SQL Server backend and I'm attempting to mirror the field names in each table as closely as I can to minimize the required coding changes. Apparently, 'status', for a field name, is not an issue for Access as this app has been in production for years without a problem. It is an inquriry tracking system and this field actually houses the status of a logged inquiry so I think on the SQL Server side I'll change it to Inquiry_Status.
I was more curious than anything else. I looked all over trying to find 'status' on a reserved word list for T-SQL and found plenty o'nothin
Not reserved for 2000,2005 and 2008 as far as i know.
I have an 2000 sql here and (what where the odds) happened to have a table with a column named status and it works fine for over a decade.
Actually i have pinpointed the "problem".
The "status" word is used by the DATABASEPROPERTYEX expression.
DATABASEPROPERTYEX includes a "status" property.So the system is telling you that the word is not actually reserved but is used on some slq mechanism.
It's like p.e. the word "type" that is not reserved but is used on the "FOR XML PATH". I don't think it would be proper for microsoft to reserve every little bit of word used in the expressions so it's giving you a "warning" (that i am not getting in my, sql db.Propably some property on the options is on?).