in my table i will update only 100 record among 1000
records i need to display recently updated record'.....can u
tell me where those records are stored how can i display
those records...?if there is any sql query pls let me know....?

Answers were Sorted based on User's Feedback



in my table i will update only 100 record among 1000 records i need to display recently updated re..

Answer / kingmanish

Generally while updating rows in table we also update te
sourcr by which the rows were update( like program id)

also upadate date etc.

we can retrive the records having timestamp of the time the
rows were updated or the program name which was used to
update the table

Is This Answer Correct ?    1 Yes 0 No

in my table i will update only 100 record among 1000 records i need to display recently updated re..

Answer / adarsha

Use the DB2 COPY Utility with Incremental Image copy.. which
give you the latest update done to a prticular table/table
space from last update .. below is the utility step

COPY TABLESPACE DSN8D51A.DSN8S51E
FULL NO
SHRLEVEL CHANGE

Use jcl for that

Is This Answer Correct ?    2 Yes 2 No

in my table i will update only 100 record among 1000 records i need to display recently updated re..

Answer / vikram

Use the below query to fetch first 100 rows among 1000 rows ,

select * from table order by column desc fetch first 100 rows

column is either timestamp or id

so the above query gives recent 100 updated rows.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More DB2 Interview Questions

Where do you specify them?

0 Answers  


In db2, how do you insert multiple rows in 1 query using a.) Cursors, b.) Normal query?? Give syntax for both.

5 Answers   CTS,


Why PS file called Physical seqential file?How to sore data in sequential file and ESDS file? What is the use of DBRM,PLAN,package and Collection.

1 Answers  


What is index in db2?

1 Answers  


How to execute stored procedure in db2 command editor?

0 Answers  






What are concurrency issues?

0 Answers  


What is reorg and runstats in db2?

0 Answers  


What are union and union all?

0 Answers  


How can you count the number of rows from a table tab?

0 Answers  


What is image copy?

1 Answers   Virtusa,


What is an inner join, and an outer join ?

1 Answers   CTA,


I have a subprogram B calling from mainprogram A.I have opened a cursor in A ,Can i fetch the same cursor in subprogram B , If yes , Please explain the reason?

1 Answers   HeadStrong,


Categories