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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Timestamp MYSQL question

Status
Not open for further replies.
Feb 11, 2003
1
US
I have a large database with close to 1 million records. I recently added a timestamp field to one of my tables so I would be able to track when updates were made on each of these records. The only problem I am having is that when I added this field, the timestamp showed the same exact time for every record. Is there anyway to make all of these fields unique, so the time is different in all of them. I am concerned with getting my older records to all have different times in this timestamp field. It is type timestamp(14)

Thanks for you help
Steve
 
timestamp is updated when a record is changed or inserted. When you added the timestamp column, you updated all the rows at once, so having the same value in all rows is correct behavior.

You can explicitly change the value of a timestamp field to an arbitrary value. Want the best answers? Ask the best questions: TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top