How to check timestamp for inserted or changed row



IBM's flagship relational database management system

How to check timestamp for inserted or changed row

Postby Chaitnya » Fri Jul 23, 2010 4:44 am

Hi,

Can anyone tell me how to return timestamp for inserted or changed row in table.

Scenario is I have to check on which date the particular row has been inserted in a table.

Thank in advance,

Chaitnya
Chaitnya
 
Posts: 18
Joined: Wed Mar 26, 2008 1:04 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to check timestamp for inserted or changed row

 

Re: How to check timestamp for inserted or changed row

Postby dick scherrer » Fri Jul 23, 2010 9:01 am

Hello,

If the table was defined with a timestamp, use that timestamp in a query.

If there is no timestamp in the table, i do not believe you have a way to find a non-recorded date . . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: How to check timestamp for inserted or changed row

Postby salltm » Wed Aug 04, 2010 1:45 pm

In commonly DB2 table design, we shold have a DEL_TMSTP /ADD_TMSTP/ CHG_TMSTP to make sure the data can be traced.

if you don't have any columns like this. Sorry, It is differect to trace the Data change.
Ask DBA for help?
salltm
 
Posts: 4
Joined: Fri Dec 05, 2008 8:40 am
Location: China
Has thanked: 0 time
Been thanked: 0 time

Re: How to check timestamp for inserted or changed row

Postby RENGANATHAN » Sat Nov 20, 2010 8:38 am

create a new column and set current sqlid='timestamp'
learner(admin)
RENGANATHAN
 
Posts: 9
Joined: Thu Jul 29, 2010 2:23 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post