Table of ContentsPreviousNext

Ispirer             Ispirer


Ispirer SQLWays Database Migration Software

Column Default Values

This section describes usage of the DEFAULT option in various databases and their conversion by SQLWays.

DEFAULT is used to assign the default value to the column if a subsequent INSERT statement omits the value for the column.

TABLE 98. Column Default Values
Database
Syntax
Description
MySQL
DEFAULT expression
DEFAULT allows you to specify the default value to the column in MySQL.
 
Expression can include a constant.
Microsoft
SQL Server
DEFAULT expression 
DEFAULT allows you to specify the default value to the column in Microsoft SQL Server.
 
Expression can include a constant, built-in function or a mathematical expression.
Oracle
DEFAULT expression 
DEFAULT allows you to specify the default value to the column in Oracle.
 
Expression can include a constant, any SQL function except for those, which return a literal argument, a column reference or a nested function invocation.
 
Restrictions: expression cannot contain references to PL/SQL functions or to other columns, date constants that are not fully specified and pseudo columns LEVEL, CURRVAL, NEXTVAL, and ROWNUM.
IBM DB2
DEFAULT expression 
DEFAULT allows you to specify the default value to the column in DB2.
 
Expression can include a constant, a special register like CURRENT DATE, CURRENT TIME or CURRENT TIMESTAMP, CURRENT SCHEMA, USER and a cast function.
 
Restrictions: expression cannot contain the value of the DATALINK type, object identifier of a typed table, the data of the structured type.


Table of ContentsPreviousNext
Ispirer             Ispirer
Copyright © 1999-2015 Ispirer Systems Ltd. Ispirer and SQLWays are trademarks of Ispirer Systems Ltd. All other product names may be trademarks of the respective companies. All rights reserved.