Specifies the column is auto incrementing.
final byte ColumnSchema.COLUMN_DEFAULT_AUTOINC
When using AUTOINCREMENT, the column must be one of the integer data types, or an exact numeric type. On an INSERT, if a value is not specified for the AUTOINCREMENT column, a unique value larger than any other value in the column is generated. If an INSERT specifies a value for the column that is larger than the current maximum value for the column, the value is used as a starting point for subsequent inserts.
In UltraLiteJ, the autoincremented value is not set to 0 when the table is created, and AUTOINCREMENT generates negative numbers when a signed data type is used for the column. Therefore, declare AUTOINCREMENT columns as unsigned integers to prevent negative values from being used.
The default value of existing tables can be determined by querying the system table TableSchema.SYS_COLUMNS's column_default column.
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |