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.
NoteTables 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. |
In Sybase Central, you can perform these tasks while working with a selected database.
Connect to the UltraLite database.
Open the Tables folder.
From the File menu, choose New > Table.
The Table Creation wizard appears.
In the Table Creation wizard, enter a name for the new table.
Click Finish.
On the Columns tab in the right pane, add columns to the table.
Choose File > Save Table when finished.
In Interactive SQL, you can declare columns while creating a new table.
Connect to the UltraLite database.
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 ( SkillID INTEGER PRIMARY KEY, SkillName CHAR( 20 ) NOT NULL, SkillType CHAR( 20 ) NOT NULL )