Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Timestamp

Status
Not open for further replies.

quisar

Programmer
Aug 21, 2002
45
IN
Hello,

I need to identify the latest 5 rows inserted in my table. I am using a timestamp col for this. But in case of bulk insert that col has same values at times. I want it to be unique. How can i achieve this without adding another col in the table?

Thanks,

Quisar
 
You can not be unique, because oracle itself may insert rows parallely.
You may try to use sequence generated unique field instead of or in addition to timestamp. In this case the sequence should be created with nocache.
 
try this:
I might be inserting sysdate in the some column of the table.
Instead of that insert sysdate+(1/(24*60*60))
So all the date columns will sequentially increase.

I hope it work.......
 
try this:
I might be inserting sysdate in the some column of the table.
Instead of that insert sysdate+(1/(24*60*60))
So all the date columns will sequentially increase by one second.
I hope it work.......
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top