October 18, 2005 at 11:40 pm
How can I find every table on my database where a particular column is present. In oracle you would use USER_TAB_COLUMNS.
October 18, 2005 at 11:56 pm
I assume you mean "every table on my database where a column with a particular name is present".
SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME = @columnname
October 19, 2005 at 12:12 am
Thanks very much for that. I have a further question however. Where can I see all the tables that belong to the Information_schema? Can this be seen from enterprise manager?
October 19, 2005 at 12:37 am
information schema objects are extractions of sys tables see,
select * from sysobjects where name like 'sys%'
But I think you are seeking some other thing,posting your corret requirement will enable other experts to help you in your need
regards
john
October 19, 2005 at 1:00 am
First of all, you should read this good article by Trudy Pelzer regarding metadata. As you will find, the INFORMATION_SCHEMA way of describing metadata is the ANSI-standard recommended way, and it is really a 'flaw' of Oracle not to have them.
So to find which views exist you could really look in the SQL standard, if you happen to have it around. Otherwise, take a look in Books Online (the SQL Server documentation that comes with the product). Just enter INFORMATION_SCHEMA in the index view to get them listed.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply