Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
need all tables in a sybase database
marcussteiner
Hi all,
does anyone know what the equivelant in sybase is to get all tables/views from a specific schema? In Oracle it's "select * from user_tables" and in db2 it's "list tables".
Thanks
hollis
Find more posts tagged with
Comments
Migrateduser
I think what you need to do is:
SELECT name FROM sysobjects WHERE type = 'U'
to get all tables. I believe views are a different type, but that should be a good start.
Dave
Current Environment(s):
(1) TS 6.5 on W2K3
(2) TS 6.1 SP1 on W2K3
By the way, I miss Unix terribly.
marcussteiner
Thanks a lot Dave. This is what I got this morning from another forum:
select user_name(uid),name,type
from <dbname>..sysobjects
where type in ("U","V")
where user_name(uid) = 'somebody'
or
select name from sysobjects will give you the name of the objects. You can filter objects based on type. "S" for system tables, "V" for views and "U" for user tables. uid column in sysobjects gives you the owner of the object.
cheers
hollis