What is the best way to get the names of all of the tables in a specific database on SQL Server?
相关问题
- sql execution latency when assign to a variable
- What is the best way to cache a table from a (SQL)
- php PDO::FETCH_ASSOC doesnt detect select after ba
- Bulk update SQL Server C#
- SQL to Parse a Key-Value String
相关文章
- Entity Framework 4.3.1 failing to create (/open) a
- How to truncate seconds in TSQL?
- Code for inserting data into SQL Server database u
- Delete Every Alternate Row in SQL
- Linux based PHP install connecting to MsSQL Server
- SQL Azure Reset autoincrement
- How do we alias a Sql Server instance name used in
- Is recursion good in SQL Server?
The downside of
INFORMATION_SCHEMA.TABLES
is that it also includes system tables such asdtproperties
and theMSpeer_...
tables, with no way to tell them apart from your own tables.I would recommend using
sys.objects
(the new version of the deprecated sysobjects view), which does support excluding the system tables:SQL Server 2012
select * from sysobjects where xtype='U'
Please use this. You will get table names along with schema names: