Data in the system tables is only viewable using views—specifically, system views; you cannot query a system table directly. With a few exceptions, almost all of the system tables have a corresponding view. The system views are named similar to the system tables, but without an I at the beginning. For example, the list of all views in the database is stored in the ISYSTAB system table. You can access this information using the SYSTAB system view. You can also use the more readable system view SYSVIEWS (recommended) to retrieve the same information.
For more information about these, see SYSTAB system view, and SYSVIEWS consolidated view.
For a list of views provided in SQL Anywhere, as well as a description of the type of information they contain, see Views.
You can either use Sybase Central or Interactive SQL to browse system view data.
Connect to the database as the DBA.
Open the Views folder.
Select the view corresponding to the desired system table.
In the right pane, switch to the Data tab.
Connect to the database as the DBA.
Execute a SELECT statement that references the system view corresponding to the desired system table.
Suppose you want to view the data in the ISYSTAB system table. Since you cannot query the table directly, the following statement displays all data in the corresponding SYS.SYSTAB system view:
SELECT * FROM SYS.SYSTAB;
Sometimes, columns that exist in the system table do not exist in the corresponding system view. To extract a text file containing the definition of a specific view, use a statement such as the following:
SELECT viewtext FROM SYS.SYSVIEWS WHERE viewname = 'SYSTAB'; OUTPUT TO viewtext.sql FORMAT ASCII ESCAPES OFF QUOTE '';