July 15, 2009 at 11:34 pm
Hi,
Can anybody elaborate the difference Between
1- Information_Schema.Columns
2- Sys.Columns
Tables in SQL Server 2005. I need to check the existance of a particular column or constraint over a column i a table. which one will you recommend and why.
Regards
Muhammad Asif
July 16, 2009 at 5:18 am
both are views of course, created to help pull information about the metadata together.
the data in the two columns will often be the same; Information_Schema is a standard format...if you write a query against it, you should be able to copy and paste that query to query another database system.Oracle,MySQL, etc, but I've never done that yet to prove the concept.
sys.columns is a view that microsoft put together that they believe offers information you might need, and often has information not found in information_schema.
Microsoft has said that the column order in their sysviews will remain the same in future versions, and if they add more information, they will apend new columns to the end of the views.
Lowell
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply