Minimum year value in SQL server 2008(date data type)
SQL server 2008 comes with lots of new features and they separated SQL server datetime data type as Date and Time (datetime data type also available).SQL server previous versions (SQL 2000, SQL 2005) there is limit for min date (year-1753) and max date (year-9999). But when you notice SQL server 2008 date data type min date is 0001./* Date 24/06/2008 SQL SERVER 2000 and 2005 */ DROP TABLE dateCheck; CREATE TABLE dateCheck(dateCol datetime); GO --can INSERT INTO dateCheck(dateCol) VALUES ('12/31/1753') GO --can't INSERT INTO dateCheck(dateCol) VALUES ('01/01/1752') GO SELECT * FROM dateCheck GO /* Date 24/06/2008 SQL SERVER 2008 */ --datetime data type DROP TABLE dateCheckDateTime; CREATE TABLE dateCheck(dateCol datetime); GO --can INSERT INTO dateCheck(dateCol) VALUES ('12/31/1753'); --can't INSERT INTO dateCheck(dateCol) VALUES ('01/01/1752'); GO SELECT * FROM dateCheck; GO --date data type DROP TABLE dateCheckDate; CREATE TABLE dateCheckDate(dateCol date); GO --can INSERT INTO dateCheckDate(dateCol) VALUES ('01/01/1753'); INSERT INTO dateCheckDate(dateCol) VALUES ('01/01/1752'); INSERT INTO dateCheckDate(dateCol) VALUES ('01/01/0001'); GO SELECT * FROM dateCheckDate; GO |