OracleSync2MySQL icon indicating copy to clipboard operation
OracleSync2MySQL copied to clipboard

DATETIME DEFAULT CURRENT_TIMESTAMP

Open tithonus163 opened this issue 9 months ago • 1 comments

DATETIME DEFAULT CURRENT_TIMESTAMP

mysql> select version(); +------------+ | version() | +------------+ | 5.7.34-log | +------------+ 1 row in set (0.00 sec)

mysql>

mysql> CREATE TABLE example ( -> id INT AUTO_INCREMENT PRIMARY KEY, -> name VARCHAR(50), -> created_at DATETIME DEFAULT sysdate -> ); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'sysdate )' at line 4 mysql> CREATE TABLE example ( -> id INT AUTO_INCREMENT PRIMARY KEY, -> name VARCHAR(50), -> created_at DATETIME DEFAULT now -> ); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'now )' at line 4 mysql> CREATE TABLE example ( -> id INT AUTO_INCREMENT PRIMARY KEY, -> name VARCHAR(50), -> created_at DATETIME DEFAULT CURRENT_TIMESTAMP -> ); Query OK, 0 rows affected (0.05 sec)

mysql>

tithonus163 avatar Apr 05 '25 19:04 tithonus163

Hello,please upload something like error info then I can help you.

iverycd avatar Apr 08 '25 03:04 iverycd