List names of all tables in a SQL Server 2012 schema

前端 未结 6 445
再見小時候
再見小時候 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:13

    SQL Server 2005, 2008, 2012 or 2014:

    SELECT * FROM information_schema.tables WHERE TABLE_TYPE='BASE TABLE' AND TABLE_SCHEMA = 'dbo'
    

    For more details: How do I get list of all tables in a database using TSQL?

提交回复
热议问题