Subject | Re: [firebird-support] trigger error ... column unknown |
---|---|
Author | ibrahim bulut |
Post date | 2004-01-08T08:45:26Z |
You can do it without a trigger
example
CREATE TABLE TABLE1
(ID INTEGER NOT NULL,
CREATEBY VARCHAR(20) DEFAULT USER,
CREATEON TIMESTAMP DEFAULT 'NOW',
PRIMARY KEY ID
);
But, if you want to do it with a trigger, you must do this
new.createby = USER;
new.createon = 'NOW';
Best regards,
ibrahim Bulut
Software/Database Developer
Republic Of Turkey
example
CREATE TABLE TABLE1
(ID INTEGER NOT NULL,
CREATEBY VARCHAR(20) DEFAULT USER,
CREATEON TIMESTAMP DEFAULT 'NOW',
PRIMARY KEY ID
);
But, if you want to do it with a trigger, you must do this
new.createby = USER;
new.createon = 'NOW';
Best regards,
ibrahim Bulut
Software/Database Developer
Republic Of Turkey
----- Original Message -----
From: "Martijn Tonies" <m.tonies@...>
To: <firebird-support@yahoogroups.com>
Sent: Thursday, January 08, 2004 10:43 AM
Subject: Re: [firebird-support] trigger error ... column unknown
>
>
> > Thomas Steinmaurer wrote:
> >
> > >The CURRENT_USER keyword isn't available in IB 6.
> > >
> > >Use USER instead. That will work for both.
> > >
> > >
> > Thanks a lot Thomas. How about current_timestamp? Is there a
> > current_timestamp in ib6 or I have to use timestamp?
>
> current_timestamp is fine.
>
> With regards,
>
> Martijn Tonies
> Database Workbench - developer tool for InterBase, Firebird, MySQL & MS
SQL
> Server.
> Upscene Productions
> http://www.upscene.com
>
>
>
>
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/firebird-support/
>
> To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to:
> http://docs.yahoo.com/info/terms/
>
>