I have the following simple tSQL to create a table
CREATE TABLE NewsArticles
(id INT NOT NULL IDENTITY(1, 1) PRIMARY KEY,
lastCrawl DATETIME NULL,
snippet NVARCHAR(2083) NULL,
source NVARCHAR(2083) NULL,
title NVARCHAR(2083) NULL,
url NVARCHAR(2083) NULL)
In both Visual Studio 2012 and SQL Server 2012 Management Studio "source" is rendered in grey while the other column names are rendered green in SSMS or black in VS. Why? The word "source" does not appear to be a reserved word in the list of SQL reserved keywords
It is a keyword used in MERGE
. i.e. WHEN NOT MATCHED BY SOURCE
.
The word MATCHED
also exhibits the same behaviour in that it gets highlighted grey in the editor.
Neither of these are reserved keywords though so if used as an identifier they do not need to be delimited (unless you find the syntax highlighting distracting).
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