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:

About Rob

I've been interested in computing since the day my Dad purchased his first business PC (an Amstrad PC 1640 for anyone interested) which introduced me to MS-DOS batch programming and BASIC.

My skillset has matured somewhat since then, which you'll probably see from the posts here. You can read a bit more about me on the about page of the site, or check out some of the other posts on my areas of interest.

No Comments

Add a Comment