Blog Archives

How to set default value for a datetime column in SQL Server to a constant

I had the need today, to set the default value for a datatime column in SQL Server to something else than GETDATE(). In my case, I wanted a default value of 2014/01/01. I could not easily find info on what

Posted in SQL Server

About Thomas

My name is Thomas Hjorth Biilmann. I'm a pragmatic, humorous, floorball-playing computer programmer living in Denmark, along with 5,5 million other shiny happy people.
I work for DanPilot - Denmark's largest maritime pilotage service provider - where I design and implement systems that are at the very core of the business.
I am also the father of three little princesses - because that is what real Kings produce.
Subscribe via RSS
Use: http://biilmann.dk/?feed=rss2