INFORMATION_SCHEMA.TABLES : INFORMATION_SCHEMA « System « SQL Server / T-SQL






INFORMATION_SCHEMA.TABLES

 


7> SELECT top 10 * FROM INFORMATION_SCHEMA.TABLES
8> GO
TABLE_CATALOG                                                                                                                    TABLE_SCHEMA
                                                          TABLE_NAME                                                                                                                       TABLE_TYPE
-------------------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------
--------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------- ----------
master                                                                                                                           dbo
                                                          spt_fallback_db                                                                                                                  BASE TABLE
master                                                                                                                           dbo
                                                          spt_fallback_dev                                                                                                                 BASE TABLE
master                                                                                                                           dbo
                                                          spt_fallback_usg                                                                                                                 BASE TABLE
master                                                                                                                           dbo
                                                          airplane                                                                                                                         BASE TABLE
master                                                                                                                           dbo
                                                          spt_monitor                                                                                                                      BASE TABLE
master                                                                                                                           dbo
                                                          spt_values                                                                                                                       BASE TABLE
master                                                                                                                           dbo
                                                          MSreplication_options                                                                                                            BASE TABLE

(7 rows affected)

 








Related examples in the same category

1.Query INFORMATION_SCHEMA.VIEWS
2.Another way to test for the existence of a table