Re: defaulting date/time to current

From: michael ngong <mngong_at_yahoo.com>
Date: 3 Oct 2002 08:33:15 -0700
Message-ID: <ecf365d5.0210030733.6e91149e_at_posting.google.com>


postbus_at_sybrandb.demon.nl (Sybrand Bakker) wrote in message news:<a20d28ee.0210022329.2074bb54_at_posting.google.com>...
> mfaine_at_knology.net (Mark) wrote in message news:<329dd608.0210021054.189bab2a_at_posting.google.com>...
> > Would this work in a CREATE TABLE command:
> > create table "form" (
> > "form_number" char(8) not null,
> > ...
> > "form_revision_date" date default (select to_char(sysdate, 'yyyy-mm-dd
> > hh24:mi:ss') from dual;) not null,
> > ...
> > );
> >
> > Or (even if it doesn't produce a syntax error) would that make the
> > date/time always default to the date/time when the table was created.
> >
> > Thanks,
> > -Mark
>
> it wouldn't work. default sysdate is the proper syntax, and it would
> make the date/time default to the date/time the *record* was created
> (which is what you probably want)
>
> Hth
>
>
> Sybrand Bakker
> Senior Oracle DBA
>
> Sybrand Bakker

I would try creating the table and see if it errs or not.

Michael Tubuo Ngong Received on Thu Oct 03 2002 - 17:33:15 CEST

Original text of this message