Displays information about tables in the database.
DBA authority required. Users without DBA authority must be granted EXECUTE permission to run the stored procedure.
If you do not specify either of the first two parameters, but specify the next parameter in the sequence, you must substitute NULL for the omitted parameters. For example, sp_iqtable NULL,NULL,TEMP and sp_iqtable NULL,dbo,SYSTEM.
The parameters can be specified in any order. Enclose them in single quotes.
The allowed values for the table_type parameter:
table_type value |
Information displayed |
---|---|
SYSTEM |
System tables |
TEMP |
Global temporary tables |
VIEW |
Views |
ALL |
IQ tables, system tables, and views |
any other value |
IQ tables |
Specifying one parameter returns only the tables that match that parameter. Specifying more than one parameter filters the results by all of the parameters specified. Specifying no parameters returns all Sybase IQ tables in the database. There is no method for returning the names of local temporary tables.
Column name |
Description |
---|---|
table_name |
The name of the table. |
table_type |
BASE – a base table. MAT VIEW - a materialized view. (SA tables only) GBL TEMP - a global temporary table. PARTITION - a table partition (this table is for internal use only and cannot be used by Sybase IQ users). VIEW – a view. JVT – a join virtual table. |
table_owner |
The owner of the table |
server_type |
IQ – an object created in the IQ store. SA – an object created in the SA store. All views are created in the SA store. |
location |
TEMP – IQ temporary store. MAIN – IQ store. SYSTEM – catalog store. |
dbspace_id |
Name of the dbspace where the table resides. |
isPartitioned |
'Y' if the column belongs to a partitioned table and has one or more partitions whose dbspace is different from the table partition’s dbspace, 'N' if the column’s table is not partitioned or each partition of the column resides in the same dbspace as the table partition. |
remarks |
User comments added with the COMMENT statement. |
table_constraints |
Constraints against the table. |