Error
Error Code: 1293

MariaDB Error 1293: Multiple Auto-Updating Timestamps

📦 MariaDB
📋

Description

This error occurs when attempting to define a table with more than one `TIMESTAMP` column that uses `CURRENT_TIMESTAMP` (or its synonyms like `NOW()`) in its `DEFAULT` or `ON UPDATE` clause. MariaDB, like MySQL, limits tables to a single `TIMESTAMP` column with these automatic update properties.
💬

Error Message

Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
🔍

Known Causes

3 known causes
⚠️
Multiple Auto-Updating TIMESTAMP Columns
This occurs when a `CREATE TABLE` statement defines more than one `TIMESTAMP` column with `DEFAULT CURRENT_TIMESTAMP` or `ON UPDATE CURRENT_TIMESTAMP` clauses.
⚠️
Altering to Add a Second Auto-Updating TIMESTAMP
An `ALTER TABLE` statement attempting to add or modify a second `TIMESTAMP` column to include `DEFAULT CURRENT_TIMESTAMP` or `ON UPDATE CURRENT_TIMESTAMP` triggers this error.
⚠️
Using Synonyms for Auto-Update
The error can also occur if `NOW()` or other equivalent functions are used in `DEFAULT` or `ON UPDATE` clauses for multiple `TIMESTAMP` columns, as they resolve to `CURRENT_TIMESTAMP`.
🛠️

Solutions

Coming Soon

Detailed step-by-step solutions for this error are being prepared. In the meantime, try these general troubleshooting tips:

General Troubleshooting Tips

  • Check the error message carefully for specific details
  • Review recent changes that might have caused the error
  • Search for the exact error code in the official documentation
  • Check log files for additional context
  • Try restarting the application or service
🔗

Related Errors

5 related errors