Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: insert user and data login in a table
"Daniel Morgan" wrote...
> Maurizio wrote:
> >
> >>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)
>
Hi Daniel,
since the OP wants to insert the "login time" I don't see how your DEFAULT SYSDATE reflects that (unless you use this in a logon trigger). I am still uncertain what the OP wants to do. Just logging the logins or identify who entered specific records in a table?
Greetings,
Guido
Received on Thu Sep 11 2003 - 03:13:17 CDT