Case study 11: List all tables in database
  • Platform: HP-UNIX 11, Tru64, Windows
  • Sybase ASE version: 12.5.x
  • Background story: Listing all tables in database is a repeating task, especially in developer environment, in early stages of database design.
  • Task: Write a script which lists all tables in database.
  • Solution: All necesary data for this script can be found in sysobjects table in selected database. So, SQL script for selecting tables in database is given below:

    select name from sysobjects where type = 'U' order by name

  • Remark: More about Sybase internal organization can be seen in this picture. Following this and using Sybase reference manuals, the meaning of every system table and column can be found.


Locations of visitors to this page
   
  powered by myself. DBA-Sybase 2006