![]() | ![]() |
Home |
|
|
Access Service User's Guide DirectConnect for AS/400 |
|
| Chapter 12 Accessing catalog information with CSPs |
|
| sp_tables |
|
| Usage |
The access service CSP configuration properties limit the set of object types for which information is returned. Using the table_type parameter, the object types can be more limited, but not less limited. For example, if the access service CSP configuration properties indicate that only tables and views are included and the table_type parameter specifies all object types are included, sp_tables only returns information about tables and views. For more information, see "DatabaseName" .
For OS/400 version 3.1, the result set of this function can be limited by the DatabaseName configuration property, which indicates the name of a collection. For information, see "DatabaseName" .
The access service selects information from the SYSSYNONYMS, SYSTABAUTH, and SYSTABLES system catalog tables.
This function corresponds to the ODBC function SQLTables.
sp_tables returns a list of database objects. Results are ordered by the following columns:
TABLE_TYPE
TABLE_OWNER
TABLE_NAME
The lengths for varchar columns shown in the result set tables are maximums; the actual lengths depend on the target database. The following table shows the result set.
Column | Datatype | Description |
TABLE_QUALIFIER | varchar(128) | Always NULL |
TABLE_OWNER | varchar(128) | Collection name or NULL |
TABLE_NAME | varchar(128) | Name of the object about which information is returned |
TABLE_TYPE | varchar(128) NOT NULL | One of the following:
|
REMARKS | varchar(254) | A description of the table or NULL |
|
|