What are the INFORMATION_SCHEMA views?
They're fantastically useful things which make it easy to access metadata in SQL Server in a (theoretically!) version agnostic manner. I've mentioned them (or similar) in SQL Server 2005: sysXXXX tables and Finding the Foreign Keys for a table.
Something that's long been on my list of things to do is to explore the INFORMATION_SCHEMA views and re-code some things which I use that directly reference the sysXXXX tables so that they use INFORMATION_SCHEMA views. One of these is a one line script which generates a resultset containing one row for each Foreign Key in a database, eg. "DROP CONSTRAINT [xxxxxxxxxxx]". Very useful, but if all is to be believed, it won't work in SQL Server 2005.
Related Links:
- [DevX.com] INFORMATION_SCHEMA: A Map to Your Database
A quick, and quite useful overview of INFORMATION_SCHEMA views. Explains both the pros and cons. - [msdn] SQL Essentials: Foreign Key Metadata: Improving on INFORMATION_SCHEMA views
An interesting article on extending the INFORMATION_SCHEMA views to increase their usefulness.