Returns a list of objects that can appear in a from clause.
sp_tables [table_name] [, table_owner][, table_qualifier][, table_type]
"'TABLE', 'SYSTEM TABLE', 'VIEW'"
sp_tables @table_type = "'TABLE', 'VIEW'"
The results set for sp_tables is:
Column |
Datatype |
Description |
---|---|---|
table_qualifier |
varchar(30) |
The database name. This field can be NULL. |
table_owner |
varchar(30) |
|
table_name |
varchar(30) |
NOT NULL. The table name. |
table_type |
varchar(32) |
NOT NULL. One of the following: 'TABLE', 'VIEW', 'SYSTEM TABLE'. |
remarks |
varchar(254) |
NULL |
The SAP ASE server does not necessarily check the read and write permissions on table_name. Access to the table is not guaranteed, even if you can display information about it.
The results set includes tables, views, and synonyms and aliases for gateways to DBMS products.
If the server attribute accessible_tables is “Y” in the results set for sp_server_info, only tables that are accessible by the current user are returned.
Any user can execute sp_tables.
master.dbo.sysattributes, master.dbo.sysloginroles, master.dbo.syssrvroles, sysroles