Wednesday, March 7, 2012

Get table_names and column_names

I want to create a function(procedure) which find all my table_names and (column names in those tables) in my database. Do anyone know of a existing function that retrives these names?You can use the INFORMATION_SCHEMA.Columns view for this information.

SELECT * FROM INFORMATION_SCHEMA.Columns

There is also a view called Tables which might be of interest to you.

Terri

No comments:

Post a Comment