Fetching metadata with SQL Server 2005
Fetching metadata is much more easier with SQL Server 2005 than it was with SQL Server 2000's esoteric system tables.
The system tables from previous versions of SQL Server are now implemented as a series of views called (appropriately enough) compatibility views. All of these views can be found in the sys schema.
Find all tables in a Database (Then-Now)
SQL SERVER 2000:
select name from sysobjects where type='U'
SQL SERVER 2005:
select name from sys.tables
The system tables from previous versions of SQL Server are now implemented as a series of views called (appropriately enough) compatibility views. All of these views can be found in the sys schema.
Find all tables in a Database (Then-Now)
SQL SERVER 2000:
select name from sysobjects where type='U'
SQL SERVER 2005:
select name from sys.tables
Comments
Post a Comment