Re: recent records in table

Re: recent records in table

 

  

An alternative might be to try using an AFTER INSERT TRIGGER. I might be
inclined to create a table to hold the primary key (and timestamp!) of the
last record added and update this record after each insert to the base
table. While this might be a good retrofit, in the future you can
eliminate the trigger complexity by having a timestamp field default to
the CURRENT TIMESTAMP as part of your base table as others have already
pointed out.




"Khan Nadeem " <db2udbdba-ezmlmshield-x97401630.[Email address protected]
03/07/07 03:46 AM

To
"LazyDBA Discussion" <[Email address protected]
cc

Subject
recent records in table











________________________________



Gurus,



Can someone tell me how in db2 we can find the latest record in tables

I mean recent inserted ones





Nadeem



This message contains information that may be privileged or confidential
and is the property of the Capgemini Group. It is intended only for the
person to whom it is addressed. If you are not the intended recipient, you
are not authorized to read, print, retain, copy, disseminate, distribute,
or use this message or any part thereof. If you receive this message in
error, please notify the sender immediately and delete all copies of this
message.


---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html


DB2 & UDB email list listserv db2-l LazyDBA home page