Sql – Is MonthName a reserved word in SQL 2008

reserved-wordssql servertsql

I am creating a table that has a column called MonthName. When I defined this column the word "MonthName" showed up in blue like it was a reserved word. So I tried to look it up.

I cannot find it in Books Online or on Microsoft's site or even on our own SO.

I tried sp_help "monthname" and the reply was "The Object 'monthname' does not exists in database 'yourdb' or is invalid for this operation.

Here is the code

Create Table AtlasDataWarehouseReports.Calendar
(
    CalendarId              Integer NOT NULL,
    DateValue               Date    NOT NULL,
    DayOfTheWeek            Integer NOT NULL,
    NameOfDay               VarChar (10) NOT NULL,
    MonthNumber             Integer NOT NULL,
    MonthName               VarChar (10) NOT NULL,  
    CalendarQuarter         Integer NOT NULL,   
    NameOfCalendarQuarter   VarChar (20) NOT NULL,
    FinancialQuarter        Integer NOT NULL,   
    NameOfFinancialQuarter  VarChar (20) NOT NULL,  
    CalendarYear            Integer NOT NULL,
    FinancialYear           Integer NOT NULL,
    WeekOfYear              Integer NOT NULL,
    JulianDay               Integer NOT NULL,
    USAIsBankHoliday        Bit     NOT NULL,
    USADayName              VarChar (100) NULL,
)
SQL Server Version Info
Microsoft SQL Server Management Studio  10.0.2531.0
Microsoft Analysis Services Client Tools 10.0.1600.22
Microsoft Data Access Components (MDAC) 3.85.1132
Microsoft MSXML 2.6 3.0 4.0 5.0 6.0 
Microsoft Internet Explorer 8.0.6001.18702
Microsoft .NET Framework 2.0.50727.3082
Operating System 5.1.2600

What, pray, is MonthName in SQL 2008?

Best Answer

as per msdn MonthName doesn't appear to be to be a reserved word.