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.
Connect to the UltraLite database.
Right-click the selected column and click Properties.
Click the Value tab.
Enter any positive integer in the Partition Size field.
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.
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) ); |
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |