Search code examples
sqldatabasesybase

How to list down all tables in a schema in sybase?


How can I list down all the tables that are present in a schema in Sybase?

In oracle SELECT* FROM SYS.ALL_TABLES works. I'm looking for a similar approach for sybase.


Solution

  • try like below by using sysobjects

    select *
    from sysobjects 
    

    and below will return your all tables of current database

    select convert(varchar(30),o.name) AS table_name
    from sysobjects o
    where type = 'U'
    order by table_name
    

    Sybase docs