SYSTABLE system table

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 count is always 0 for a view or an IQ table.

first_page Each Sybase 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 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 is 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 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 is 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 contains any CHECK constraints for the table.

remarks A comment string.

replicate Holds a Y if the table is a primary data source in a Replication Server installation, or an N if not.

“existing_obj” Indicates whether the table previously existed or not. (Y/N).

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.

primary_hash_limit For internal use.