Hi All,
In oracle I could get the column name of a table by using user_tab_columns which will give me the column name and corresponding table name. How can I do this in sql server?
If you are running SQL 7 or SQL 2000 a better way to do this is by using the information_schema views.
The one you would use in this case is.
information_schema.columns.
Microsoft does not suggest using the sys files directly (although we all do it) since the structures may change.
They do say that the information_schema views will not change (with the possible exception of additional fields), so I have been trying to use those where possible.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.