stats101
stats101

Reputation: 1877

Creating a schema called 'master'

I've created a schema called master in SS2008, however every time I type in the word, it's formatted as blue, rather than black. Should I be worried? I've checked the reserved word list, and it doesn't seem to be on there.

Upvotes: 0

Views: 385

Answers (3)

Abe Miessler
Abe Miessler

Reputation: 85036

It probably thinks you are refering to the system database which is named master. I would think that is Master is a reserved keyword. Here is a link to what the various color mean.

Red - Character string

Dark Green - Comment

Black, Silver Background - SQLCMD command 

Magenta - System function

Green - System table

Blue - Keyword

Teal - Line numbers or template parameter

Maroon - SQL Server stored procedure

Dark Grey - Operators

Upvotes: 2

slkull
slkull

Reputation: 39

Master is one of the system databases and to reduce confusion should be modified for clarity. Also the SQL parser may first look in the system master database before realizing that your referring to your schema. I know this applies if 'sys' is used when naming objects.

Upvotes: 0

user1172023
user1172023

Reputation:

It is highlighted blue because master is one of the four system databases in sql server - master, model, msdb, and tempdb.

Upvotes: 1

Related Questions