default for date/time types
default for date/time types
От:
"Seth Banks" <seth@subimage.com>
Дата:
hello, if i were to setup a date or time type in my database, what would be a good default value to use (an empty one, but not null) thanks!
Re: [SQL] default for date/time types
От:
Peter Eisentraut <e99re41@DoCS.UU.SE>
Дата:
On Sun, 5 Mar 2000, Seth Banks wrote: > if i were to setup a date or time type in my database, what would be a > good default value to use (an empty one, but not null) The way you're asking you probably do want to use NULL because there's no such thing as an "empty date". NULL is supposed to fill exactly that gap. However, if for some reason you really can't use NULL then consider perhaps 'invalid' or '-infinity' but these are distinctly non-portable and might not buy you much in terms of elegance. Implementor beware. :) -- Peter Eisentraut Sernanders väg 10:115 peter_e@gmx.net 75262 Uppsala http://yi.org/peter-e/ Sweden