CREATE TABLE SYS.SYSTABLE ( table_id UNSIGNED INT NOT NULL, file_id SMALLINT NOT NULL, count UNSIGNED BIGINT NOT NULL, first_page INT NOT NULL, last_page INT NOT NULL, primary_root INT NOT NULL, creator UNSIGNED INT NOT NULL, first_ext_page INT NOT NULL, last_ext_page INT NOT NULL, table_page_count INT NOT NULL, ext_page_count INT NOT NULL, table_name CHAR(128) NOT NULL, table_type CHAR(10) NOT NULL, view_def LONG VARCHAR, remarks LONG VARCHAR, replicate CHAR(1) NOT NULL, "existing_obj" CHAR(1), remote_location LONG VARCHAR, remote_objtype CHAR(1), srvid INTEGER, server_type CHAR(4) NOT NULL, primary_hash_limit SMALLINT NOT NULL, PRIMARY KEY ( table_id ), UNIQUE ( table_name, creator ), FOREIGN KEY ( creator ) REFERENCES SYS.SYSUSERPERM ( user_id ), FOREIGN KEY REFERENCES SYS.SYSFILE )
Each row of SYSTABLE describes one table or view in the database.
table_id Each table or view is assigned a unique number (the table number) that is the primary key for SYSTABLE.
file_id The file number indicates which database file contains the table. The file_id is a FOREIGN KEY for SYSFILE.
count The number of rows in the table is updated during each successful CHECKPOINT. This number is used by Sybase IQ when optimizing database access. The count is always 0 for a view.
first_page Each IQ database is divided into a number of fixed size pages. This value identifies the first page containing information for this table, and is used internally to find the start of this table. The first_page is always 0 for a view.
last_page The last page containing information for this table. The last_page is always 0 for a view.
primary_root Primary keys are stored in the database as B-trees. The primary_root locates the root of the B-tree for the primary key for the table. It will be 0 for a view and for a table with no primary key.
creator This user number identifies the owner of the table or view. The name of the user can be found by looking in SYSUSERPERM.
table_name The name of the table or view. One creator cannot have two tables or views with the same name.
first_ext_page For internal use.
last_ext_page For internal use.
table_page_count For internal use.
ext_page_count For internal use.
table_type This column is BASE for base tables and VIEW for views. It will be GBL TEMP for global temporary tables and JVT for join indexes. No entry is created for local temporary tables.
view_def For a view, this column contains the CREATE VIEW command used to create the view. For a table, this column will contain any CHECK constraints for the table.
replicate Holds a Y if the table is a primary data source in a Replication Server installation, or an N if not.
“existing_obj” (Y/N) Indicates whether the table previously existed or not.
remote_location Indicates the storage location of the remote object.
remote_objtype Indicates the type of remote object: 'T' if table; 'V' if view; 'R' if rpc; 'B' if JavaBean.
srvid The unique ID for the server.
server_type Indicates whether the table was created in the CATALOG STORE (SA) or IQ STORE.