how to see table associated with a schema in sql

Solutions on MaxInterview for how to see table associated with a schema in sql by the best coders in the world

showing results for - "how to see table associated with a schema in sql"
Magdalena
11 Oct 2019
1select s.name as schema_name, 
2    s.schema_id,
3    u.name as schema_owner
4from sys.schemas s
5    inner join sys.sysusers u
6        on u.uid = s.principal_id
7order by s.name
8
Simona
05 Mar 2019
1select schema_name(t.schema_id) as schema_name,
2       t.name as table_name,
3       t.create_date,
4       t.modify_date
5from sys.tables t
6where schema_name(t.schema_id) = 'Production' -- put schema name here
7order by table_name;
8