I need help in generating a query that will give me all
my DB tables and associated columns.
Thanks
On Wed, 21 Apr 2004 12:35:42 -0700, Dave Lugo wrote:
>I need help in generating a query that will give me all
>my DB tables and associated columns.
>Thanks
Hi Dave,
Try the following:
SELECT TABLE_NAME, COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
Best, Hugo
(Remove _NO_ and _SPAM_ to get my e-mail address)
|||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
>--Original Message--
>On Wed, 21 Apr 2004 12:35:42 -0700, Dave Lugo wrote:
>
>Hi Dave,
>Try the following:
>SELECT TABLE_NAME, COLUMN_NAME
>FROM INFORMATION_SCHEMA.COLUMNS
>
>Best, Hugo
>--
>(Remove _NO_ and _SPAM_ to get my e-mail address)
>.
>
|||On Thu, 22 Apr 2004 16:09:35 -0700, Dave Lugo wrote:
>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
>
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
(Remove _NO_ and _SPAM_ to get my e-mail address)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment