The partition size is any positive integer, although the partition size is generally chosen so that the supply of numbers within any one partition will rarely, if ever, be exhausted.
For columns of type INT or UNSIGNED INT, the default partition size is 216 = 65536; for columns of other types the default partition size is 232 = 4294967296. Since these defaults may be inappropriate, it is best to specify the partition size explicitly.
Default partition sizes for some data types are different in UltraLite applications than in SQL Anywhere databases. Declare the partition size explicitly if you want different databases to remain consistent.
To override UltraLite partition values (Sybase Central)
Connect to the UltraLite database.
Right-click the selected column and choose Properties from the popup menu.
The Column Properties window appears.
Click the Value tab.
Enter any positive integer in the Partition Size field.
To declare autoincrement columns in UltraLite (Interactive SQL)
Connect to the UltraLite database.
Execute a CREATE TABLE or ALTER TABLE statement with a DEFAULT GLOBAL AUTOINCREMENT clause with the partition size specified in parentheses. See UltraLite CREATE TABLE statement and UltraLite ALTER TABLE statement.
For example, the following statement creates a simple reference table with two columns: an integer that holds a customer identification number and a character string that holds the customer's name. A partition size of 5000 is required for this table.
CREATE TABLE customer ( id INT DEFAULT GLOBAL AUTOINCREMENT (5000), name VARCHAR(128) NOT NULL, PRIMARY KEY (id) ); |
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |