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: sql help

Re: sql help

From: Jonathan Gennick <gennick_at_worldnet.att.net>
Date: Thu, 23 Jul 1998 05:55:08 GMT
Message-ID: <6p6j7v$qrm@bgtnsc03.worldnet.att.net>


On Wed, 22 Jul 1998 19:11:48 GMT, gpangasa_at_my-dejanews.com wrote:

>There is no date field in the table and so want I
>really want to find out is if u create a record in a table, is there a
>timestamp on that row. Any help will be highly appreciated.

There is no automatic timestamp, but you could easily create one and write a trigger to maintain it. for example:

alter table xxx

        add (xxx_timestamp date);

create trigger xxx_timestamp

	before insert or update on xxx
	for each row

begin
  :new.xxx_timestamp := sysdate;
end;
/

Just using sysdate will give you date and time. Use trunc(sysdate) to just give you a date.

regards,

Jonathan Received on Thu Jul 23 1998 - 00:55:08 CDT

Original text of this message

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