Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: insert user and data login in a table

Re: insert user and data login in a table

From: Daniel Morgan <damorgan_at_exxesolutions.com>
Date: Tue, 09 Sep 2003 08:10:35 -0700
Message-ID: <1063120214.770763@yasure>


Maurizio wrote:

>thank to everybody
>Maurizio
>
>"Maurizio" <hillbon_at_tin.it> ha scritto nel messaggio
>news:nrh7b.304160$Ny5.9467912_at_twister2.libero.it...
>
>
>>I desired know like i can insert in automatic the [user] and the [date] of
>>login of a consumer in a table.
>>Thank you in advance
>>Maurizio
>>
>>
>>

Don't be so fast to thank them. There is a far far easier way:

CREATE TABLE test (
somefield VARCHAR2(10),
username VARCHAR2(30) DEFAULT USER,
insertdate DATE DEFAULT SYSDATE);

INSERT INTO test (somefield) VALUES ('ABC'); COMMIT; SELECT * FROM test;

You did, after all, say "automatic".

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Tue Sep 09 2003 - 10:10:35 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US