Received: from web204.mail.yahoo.com (web204.mail.yahoo.com [128.11.68.104]) by hub.org (8.10.1/8.10.1) with SMTP id e7H8xIm16531 for ; Thu, 17 Aug 2000 04:59:18 -0400 (EDT) Received: (qmail 12558 invoked by uid 60001); 17 Aug 2000 08:59:17 -0000 Message-ID: <20000817085917.12557.qmail@web204.mail.yahoo.com> Received: from [192.122.134.137] by web204.mail.yahoo.com; Thu, 17 Aug 2000 01:59:17 PDT Date: Thu, 17 Aug 2000 01:59:17 -0700 (PDT) From: Guo Bin Subject: Re: Help on some SQL command... To: Ang Sei Heng , pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Archive-Number: 200008/152 Hi, You can specify a default value for the create_date column like: create_date timestamp default 'now' In the insert statement just ommit that field and you will get the default, as insert into test1 (id, name) values (1, 'xxx'); Regards, -- Guo Bin --- Ang Sei Heng wrote: > Hello to all the SQL gurus... > > I have this little table: > > test1 ( > id char(8) primary key, > name char(20), > create_date timestamp > ); > > Now, the create_date need to be updated > to date and time whenever id is being > inserted or updated. > > Is there a way in SQL that I can do this > automatically? __________________________________________________ Do You Yahoo!? Send instant messages & get email alerts with Yahoo! Messenger. http://im.yahoo.com/