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

Consider that a package is bound into 2 different collections and the PKLIST option specifies both the collections. If the collection id is not specified in the program while executing the SQL query, then when the DB2 system will search the package list, which collection will it pick up or will it give an error/abend?

1 Answers  


What is deadlock?

2 Answers  


Name the lockable units in DB2?

0 Answers  


Could anyone clearly explain the diference between sub query and correlated sub query?

3 Answers  


In BIND, isolation level parameter specifies the duration of page lock and ACQUIRE, RELEASE also do almost the same thing. What is the exact difference between the two? Do they work in conjunction while executing SQL queries and obtaining locks?

8 Answers   Syntel,






What does this mean ? GRANT BIND,EXECUTE ON PLAN MK2 TO PUBLIC;

4 Answers   Accenture,


Which command is used to connect to a database in DB2 ? Give the Syntax.

0 Answers   MCN Solutions,


Hi, i would like to start a new carrier in DB2 DBA.Which and what all step should i have to take..?

0 Answers  


What is the maximum No of rows per page?

0 Answers   IBM,


What are the two types of logging in the db2 database? Explain them.

0 Answers  


What is DYNSLT keyword? How do you perform selection using DYNSLT

1 Answers  


How do you run JCL in cobol program

1 Answers   IBM, Syntel,


Categories