July 12, 2012 at 5:28 am
Hi everybody,
I will create an application to list the columns of my database, what the difference between sys.columns and syscolumns ?
They are not tables? which tables these views access ?
Thanks,
Jose A. Carvalho Jr
July 12, 2012 at 5:39 am
JoseACJr (7/12/2012)
Hi everybody,I will create an application to list the columns of my database, what the difference between sys.columns and syscolumns ?
They are not tables? which tables these views access ?
Thanks,
Jose A. Carvalho Jr
both are views.
syscolumns is a view that is deprecated and will be dropped in an upcoming version of SQL; it was left in place for compatibility when SQL 2005 was introduced. In versions 2000 and prior, it was the actual meta data of the columns,a nd you could potentially directly edit that data; in 2005 it became a true view, and the ability to directly manipulate the meta data was removed (from those types of compatibility views)
sys.columns is a view that MS plans on maintaining; they may add more columns to the end int eh future, but the columns and order of what exists now should stay the same.
Lowell
July 12, 2012 at 9:35 am
You could also use the ANSI standard INFORMATION_SCHEMA.COLUMNS view. I have used that in an application that had to work with SQL Server, SYBASE, DB2.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply