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

SQL Anywhere 10.0.1 » UltraLite - Database Management and Reference » Working with UltraLite Databases » Working with UltraLite tables and columns

Working with UltraLite tables and columns Next Page

Creating UltraLite tables

You can create new tables to hold your relational data, either with SQL statements in Interactive SQL or with Sybase Central.

In UltraLite, you can only create base tables, which you declare in order to hold persistent data. The table and its data continue to exist until you explicitly delete the data or drop the table. UltraLite does not support global temporary or declared temporary tables.


Tables in UltraLite applications must include a primary key. Primary keys are also required during MobiLink synchronization, to associate rows in the UltraLite database with rows in the consolidated database.

Sybase Central

In Sybase Central, you can perform these tasks while working with a selected database.

To create an UltraLite table (Sybase Central)
  1. Connect to the UltraLite database.

  2. Open the Tables folder.

  3. From the File menu, choose New > Table.

    The Table Creation wizard appears.

  4. In the Table Creation wizard, enter a name for the new table.

  5. Click Finish.

  6. On the Columns tab in the right pane, add columns to the table.

  7. Choose File > Save Table when finished.

Interactive SQL

In Interactive SQL, you can declare columns while creating a new table.

To create an UltraLite table (Interactive SQL)
  1. Connect to the UltraLite database.

  2. Execute a CREATE TABLE statement.

    Example    The following statement creates a new table to describe the various skills and professional aptitudes of employees within a company. The table has columns to hold an identifying number, a name, and a type (for example, technical or administrative) for each skill.

    CREATE TABLE Skills (
       SkillName CHAR( 20 ) NOT NULL,
       SkillType CHAR( 20 ) NOT NULL
  3. See also