Mysql Single table multi-timestamp Error #1293-Incorrect table definition; there

Source: Internet
Author: User
Tags table definition


Mysql returns an error when multiple timestamp entries exist in a single table #1293-Incorrect table definition; there can be only one TIMESTAMP column with C solves the problem of multiple timestamps in a table and setting one of them as current_timestamp. #1293-Incorrect table definition is often encountered; there can be only oneTIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATEclause www.2cto.com because when you set a timestamp to on updatecurrent_timestamp, the default value must be explicitly set for other timestamp fields. However, if you have two timestamp fields The default value is current_timestamp and the second one is not set. mysql can also create tables successfully, but in turn it won't work... www.2cto.com N. b: The above explanation is online. In fact, on updatecurrent_timestamp (the "Refresh current timestamp" option in the Chinese version of navicat) can only be set to one or not set, you cannot set two or more.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.