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....?
Answer Posted / 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 View All Answers
What is iseries database?
Why cursor is used in db2?
How to check sequence on a table in db2?
What does db2 stand for?
What is the reason behind not using select * in embedded sql programs?
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?
What do you mean by commit and rollback?
What is declare cursor?
What is check constraint in db2?
Mention some fields that are a part of sqlca.
For a db2 column that is being defined as decimal (11, 2), discuss the cobol picture clause.
What is a bind card?
DB2 can implement a join in three ways using a merge join, a nested join or a hybrid join. Explain the differences?
What is null indicator in cobol db2?
How to find the number of rows in db2 tables?