Обсуждение: current_timestamp and default now()
hi, there, I'm using: create table test ( proposetime datetime not null default now(), ) then, I find that I need to make the time uniform through the transaction. Is there a way to use current_timestamp('now') in the create table statement? Seems impossible? thanks!!!!!!! ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com
At 01:05 PM 25-10-1999 PDT, amy cheng wrote: >hi, there, > >I'm using: > >create table test ( >proposetime datetime not null default now(), >) > >then, I find that I need to make the time uniform through the >transaction. Is there a way to use current_timestamp('now') >in the create table statement? Seems impossible? How about reading off the current time (select <somethingblahblah> 'now', I can't remember how to do it- not very obvious at first sight) and then using that time throughout the transaction? Cheerio, Link.
I believe it works if you put now() in single quotes. EG: create table test ( proposetime datetime not null default 'now()', ) At 10:07 PM 10/25/99, Lincoln Yeoh wrote: >At 01:05 PM 25-10-1999 PDT, amy cheng wrote: > >hi, there, > > > >I'm using: > > > >create table test ( > >proposetime datetime not null default now(), > >) > > > >then, I find that I need to make the time uniform through the > >transaction. Is there a way to use current_timestamp('now') > >in the create table statement? Seems impossible? > >How about reading off the current time (select <somethingblahblah> 'now', I >can't remember how to do it- not very obvious at first sight) and then >using that time throughout the transaction? > >Cheerio, > >Link. > > >************