ASA SQL User's Guide
Working with Database Objects
Working with tables
When a database is first created, the only tables in the database are the system tables, which hold the database schema. You can then create new tables to hold your actual data, either with SQL statements in Interactive SQL or with Sybase Central.
There are two types of tables that you can create:
Base table A table that holds persistent data. The table and its data continue to exist until you explicitly delete the data or drop the table. It is called a base table to distinguish it from temporary tables and from views.
Temporary table Data in a temporary table is held for a single connection only. Global temporary table definitions (but not data) are kept in the database until dropped. Local temporary table definitions and data exist for the duration of a single connection only.
For more information about temporary tables, see Working with temporary tables.
Tables consist of rows and columns. Each column carries a particular kind of information, such as a phone number or a name, while each row specifies a particular entry.
To create a table (Sybase Central)
Connect to the database.
Open the Tables folder.
From the File menu, choose New
The Table Creation wizard appears.
In the Table Creation wizard:
Type a name for the new table.
Select an owner for the table.
Create a primary key for the table.
Configure the other desired options.
Click Finish.
On the Columns tab in the right pane, you can add columns to the table.
Choose File
To create a table (SQL)
Connect to the database with DBA authority.
Execute a CREATE TABLE statement.
The following statement creates a new table to describe qualifications of employees within a company. The table has columns to hold an identifying number, a name, and a type (technical or administrative) for each skill.
CREATE TABLE skill ( skill_id INTEGER NOT NULL, skill_name CHAR( 20 ) NOT NULL, skill_type CHAR( 20 ) NOT NULL )
For more information, see CREATE TABLE statement.