这是因为mysql版本低导致的,只有5.5的会有这个问题,5.6不会有这个问题。
可以使用触发器来替代一下:
CREATE TABLE `example` ( `id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, `created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `lastUpdated` DATETIME NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB; DROP TRIGGER IF EXISTS `update_example_trigger`; DELIMITER // CREATE TRIGGER `update_example_trigger` BEFORE UPDATE ON `example` FOR EACH ROW SET NEW.`lastUpdated` = NOW() // DELIMITER ;
相关推荐
If you encounter an empty Help Index tab after installing this update, open the d7.ohi file in the Delphi7Help folder and comment out one or more of the index entries by changing the colon in column ...
SP-6868 : Rule BP018 no longer shows issue on UPDATE/DELETE statements with nested INNER JOIN clause. SP-6881, SP-6764 : 'Align items across clauses' no longer adds extra space after table alias. SP-...
If no rows satisfy the WHERE condition the first time the range is scanned, no rows should be returned on any subsequent scans. Key range locks are similar to row locks on index keys (whether ...
The SQL Window will now navigate to the offending cell in the result set after an insert or update with a column-specific error. The rowid column is now omitted when exporting a result set grid in SQL...
The SQL Window will now navigate to the offending cell in the result set after an insert or update with a column-specific error. The rowid column is now omitted when exporting a result set grid in SQL...
The SQL Window will now navigate to the offending cell in the result set after an insert or update with a column-specific error. The rowid column is now omitted when exporting a result set grid in SQL...
The SQL Window will now navigate to the offending cell in the result set after an insert or update with a column-specific error. The rowid column is now omitted when exporting a result set grid in SQL...
SQL*Plus: Release 9.2.0.1.0 - Production on Fri Oct 31 13:53:53 2003 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. SQL> connect / as sysdba Connected to an idle instance. SQL> ...
删除HKDY_LOCAL_MACHINE/SOFTWARE/ODBC/ODBCINST.INI中除Microsoft ODBC for Oracle注册表键以外的所有含有Oracle的键。 删除环境变量中的PATHT CLASSPATH中包含Oracle的值。 删除“开始”/“程序”中所有...
Q434910 - Compilation errors occur after the View's Navigator.InfoPanel.OnClick event handler has been created at design time due to the missing cxNavigator unit in the 'uses' clause Q437880 - Data-...
Q434910 - Compilation errors occur after the View's Navigator.InfoPanel.OnClick event handler has been created at design time due to the missing cxNavigator unit in the 'uses' clause Q437880 - Data-...
Q434910 - Compilation errors occur after the View's Navigator.InfoPanel.OnClick event handler has been created at design time due to the missing cxNavigator unit in the 'uses' clause Q437880 - Data-...
Q434910 - Compilation errors occur after the View's Navigator.InfoPanel.OnClick event handler has been created at design time due to the missing cxNavigator unit in the 'uses' clause Q437880 - Data-...
Q434910 - Compilation errors occur after the View's Navigator.InfoPanel.OnClick event handler has been created at design time due to the missing cxNavigator unit in the 'uses' clause Q437880 - Data-...
Q434910 - Compilation errors occur after the View's Navigator.InfoPanel.OnClick event handler has been created at design time due to the missing cxNavigator unit in the 'uses' clause Q437880 - Data-...
Q434910 - Compilation errors occur after the View's Navigator.InfoPanel.OnClick event handler has been created at design time due to the missing cxNavigator unit in the 'uses' clause Q437880 - Data-...
在工作中遇到了一个错误提示[Err]1294-Invalid ON UPDATE clause for '字段名' column,这个错误提示与数据库版本有关。具体来说,MySQL版本5.6.5之前的版本不支持多个CURRENT_TIMESTAMP默认值,而作者本地使用的...