Reputation: 304
How to get insert time of rows in mysql without using time-stamp in columns? Or is it possible of getting each row creation/insertion time in mysql ? If yes , Please let me know.
Upvotes: 3
Views: 2262
Reputation: 27092
MySQL has function NOW()
or synonymous CURRENT_TIMESTAMP()
which contains current datetime.
Ex.
INSERT INTO `table` (`col1`, `col2`, `created`) VALUES ('val1', 'val2', NOW())
Without this column there is no chance to get a time when the record was created.
Upvotes: 3