Contents Index About this chapter The SYSCOLUMNS view

ASA Getting Started
  System Tables

The SYSCATALOG view


SYSCATALOG is a view that holds a more readable form of the system table SYSTABLE. It lists all the tables in the database. You can view the data from the SYSCATALOG view in the same way that you view the data from any other table in your database.

For more information on viewing data, see Selecting a complete table.

The owner of the system tables 

The owner of the system tables and views is the special user ID SYS, and the owner of the company tables is DBA. In addition, there is a set of views owned by the special user ID dbo, which provide an emulation of the Sybase Adaptive Server Enterprise system catalog; these tables are not discussed in this section.

Recall that DBA is the user ID you used when connecting to the database from Interactive SQL. So far, you have simply typed the table names employee and department; SQL looked in SYSCATALOG for tables with those names created by DBA. In this example, by typing SYS.SYSCATALOG, you specified that SYSCATALOG was created by the user ID SYS. Note the similarity to the way column names are qualified, such as employee.emp_id.

Other columns in the system table 

The other columns in this table contain other important information. For example, the column named Ncols is the number of columns in each table, and the column named tabletype identifies the table as a base table or a view.


Contents Index About this chapter The SYSCOLUMNS view