MySQL: Column automaticly current time of insert

mysql

Solution

This should work:

CREATE TABLE table1 (
  timeStampColumn TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);

Problem

I am creating a new table, and I would like each row to have a column that is equal to the time that the row is inserted into the table. Is there a way to do this in the create table statement or do I have to do this in my insert statement?

Original source