I was writing a Stored Procedure
today and Wrote the line:
SELECT pv1.Version FROM depl...
and the word Version
turned blue shown below:
so I assumed it was a reserved word, so did some investigating here:
Reserved Keywords (TRANSACT-SQL)
But could not find the word Version
in the list.
Is Version
a SQL reserved word, and if not why is my word Version
displaying blue? I am using SQL Management Studio 2012
As you rightly noted, Version
is not in the official reserved word list. It's just a "feature" of SQL Server Management Studio that is showing it in blue.
There are many words like this. Here's a few more:
DESCRIPTION
SERVER
INSTEAD
There are even some words that show as pink such as LOOKUP
.
"Version" is not a SQL Server reserved keyword.
However, it is used in a global variable used to show the OS name & version, SQL Server version, SQL Server patches and hardware attributes of the SQL Server being used.
SELECT @@VERSION
Perhaps the "Version" text turns blue in Transact-SQL because it is known to SQL Server in the context of this global variable. I'm not sure about that, this is just a theory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With