Received: from arcamax.com (arcamax.com [206.246.240.138]) by hub.org (8.8.8/8.8.8) with ESMTP id PAA10129 for ; Mon, 19 Oct 1998 15:37:52 -0400 (EDT) (envelope-from bryan@arcamax.com) Received: from bryan.arcamax.com (bryan [206.246.240.163]) by arcamax.com (8.8.7/8.8.7) with SMTP id PAA17744 for ; Mon, 19 Oct 1998 15:37:48 -0400 Message-ID: <00b801bdfb97$f2e3f0e0$a3f0f6ce@bryan.arcamax.com> From: "Bryan White" To: Subject: Defaulting to current date Date: Mon, 19 Oct 1998 15:37:46 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 I want to have a field with a date/time value that defaults to the time the record was inserted. I also want to be abled to index this field. If I create with: create table test ( Date timestamp not null default CURRENT_TIMESTAMP ); The default value works as expected but I cannot create an index: create index testidx on test (Date); ERROR: Can't find a default operator class for type 1296. I have also tried to create the field as a DATETIME field. create table test ( Date datetime not null default CURRENT_TIME ); I can create the index but the field defaults to the table creation time instead of the insertion time. I have tried several syntax variations using CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, 'now', and text 'now'. The last one is suggested in the online documentation, however they refer specifically to v6.4 and I am running 6.3.2. It seems like I can index the field or used a default value but not both. Is this true? Bryan White ArcaMax Inc. Yorktown VA www.arcamax.com