Groups | Blog | Home
all groups > sql server mseq > april 2004 >

sql server mseq : Help with Query


Dave Lugo
4/21/2004 12:35:42 PM
I need help in generating a query that will give me all
my DB tables and associated columns.

Hugo Kornelis
4/21/2004 10:24:17 PM
[quoted text, click to view]

Hi Dave,

Try the following:

SELECT TABLE_NAME, COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS


Best, Hugo
--

Dave Lugo
4/22/2004 4:09:35 PM
Thanks. That worked out great.

What would I need to add to get the properties of the
column . ie. TABLE_NAME (numeric (10,0), Not Null

Thanks


[quoted text, click to view]
Hugo Kornelis
4/23/2004 9:43:48 AM
[quoted text, click to view]
Hi Dave,

There are many more columns in the INFORMATION_SCHEMA.COLUMNS view. If
you use SELECT *, you'll see them all and you can check which you need
and which you don't need.

Alternatively, consult Books Online for more information on this view
(as well as other INFORMATION_SCHEMA-views).

Best, Hugo
--

AddThis Social Bookmark Button