Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » UltraLite - Database Management and Reference » UltraLite as a MobiLink client » UltraLite clients » Primary key uniqueness in UltraLite » Partition sizes

 

Overriding the partition size for a GLOBAL AUTOINCREMENT column

Increasing the partition size of a GLOBAL AUTOINCREMENT column ensures that the supply of numbers within the partition is rarely exhausted.

Prerequisites

You must be connected to an UltraLite database.

 Task
  1. Create a table with a GLOBAL AUTOINCREMENT column that has a partition size specified in parentheses.

    Execute the following SQL code:

    CREATE TABLE customer (
       id   INT          DEFAULT GLOBAL AUTOINCREMENT (5000),
       name VARCHAR(128) NOT NULL,
       PRIMARY KEY (id)
    )

    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 is created. The ID has a partition size of 5000.

  2. Connect to the UltraLite database in Sybase Central.

  3. Right-click the ID column of the customer table and click Properties.

  4. Click the Value tab.

  5. Enter a positive integer that is greater than 5000 in the Partition Size field.

Results

The partition size of the ID column is updated according to the value entered in the Partition Size field.