List names of all tables in a SQL Server 2012 schema

前端 未结 6 428
再見小時候
再見小時候 2021-02-02 06:05

I have a schema in SQL Server 2012.

Is there a command that I can run in SQL to get the names of all the tables in that schema that were populated by user?

I kno

6条回答
  •  迷失自我
    2021-02-02 06:30

    SELECT t.name 
      FROM sys.tables AS t
      INNER JOIN sys.schemas AS s
      ON t.[schema_id] = s.[schema_id]
      WHERE s.name = N'schema_name';
    

提交回复
热议问题