I read that we are not allowed to have 2 columns that have 2 time-stamp. Like in my table "EMPLOYEE" I have 2 columns "CREATEDON" and "UPDATEDON" both are time-stamp.But MYSQL does not allows me to create it .But Why and what is the issue??
Asked
Active
Viewed 52 times
-5
-
2That shouldn't be a problem. You need to show us the CREATE TABLE statement you wrote AND the error message. Without that nobody can help you. – Jim Garrison Jul 11 '16 at 05:34
-
http://stackoverflow.com/questions/4851672/one-mysql-table-with-multiple-timestamp-columns .I was reading this one – mayank kumar Jul 11 '16 at 05:36
-
2Did you read the answers to that question? – Jim Garrison Jul 11 '16 at 05:38
-
Yeah I did but was unable to figure out whats the reason for not allowing 2 timestamps sorry for asking this questions and what was the problem behind it – mayank kumar Jul 11 '16 at 05:56
1 Answers
0
In the new versions of mysql in a single table, multiple timestamps can be controlled. Refer the documentation.

Akash Lodha
- 100
- 9
-
My company currently earlier version and I need to know the reason for not allowing 2 timestamps for earlier. – mayank kumar Jul 11 '16 at 05:57
-
There is no "why" that will make any difference to you. It just _is_ that way. Asking why won't change the behavior, you have to accept it and find an alternative. There's no restriction on having multiple timestamp columns if your Java code sets their values, so find a workaround. – Jim Garrison Jul 11 '16 at 06:00
-
Tell them it is because it is enforced in 72 OP Codes compiled into the `C` daemon executable (or whatever else makes their eyes glaze over). – Drew Jul 11 '16 at 06:05
-
Ok ..but I guess there are various other DB that does not allow multiple time stamps it could be better that I know the reason :( – mayank kumar Jul 11 '16 at 06:18