sp_tables

Description

Returns a list of objects that can appear in a from clause.

Syntax

sp_tables [table_name] [, table_owner]
 [, table_qualifier] [, table_type]

Parameters

table_name

is the name of the table. Use the wildcard character to request information about more than one table.

table_owner

is the owner of the table. Use the wildcard character to request information about tables owned by more than one user.

table_qualifier

For DB2 UDB targets – is ignored. Leave blank or set to NULL.

For non-DB2 targets – is the name of the database. Acceptable values are the current database or NULL.

table_type

is a list of values, separated by commas, that gives information about all tables of the types specified, including the following:

“‘TABLE’, ‘SYSTEM TABLE', ‘VIEW’, ‘SYNONYM’”

Usage