|
Ispirer SQLWays Database Migration Software
Conversion of DEFAULT syntax to MySQL
MySQL allows you to specify only constants for the DEFAULT values whereas other databases (Oracle, DB2 etc.) allow you to use expressions like CURRENT DATE as the default. If a DEFAULT value is not constant string or number, SQLWays removes the default option when converting databases to MySQL.
The only exception is if a column of the source database has a datetime data type (date with time part) with the default expression which returns the current system date and time. In this case SQLWays removes the default and converts the data type to the MySQL TIMESTAMP data type. This is because the MySQL TIMESTAMP data type as the default takes the current system date and time: