That helps, but I am looking for something else. I am looking for a special value in all columns in all tables. I do not know what the names of the tables is, neither do I know the names of the columns. I have only a special value, like the surename of a user e.g.: Alexander or an ID like 03473845599388.
So there may be three tables with some columns and I would like to find out which columns in which tables contains the value "Alexander" or the ID 03473845599388.
the result should be something like this:
Table Column
_________________
my_friends surename
birthdays name
Both tables my_friends and birthdays may contain the value "Alexander" but the first one contains it in the column surename the second one in name.
Quote:
Originally posted by amajid
If I understand it right, you are looking for a way to find out all occurances of a given column name in different tables. The following query could do it:
SELECT NAME, TBNAME
FROM SYSIBM.SYSCOLUMNS
WHERE LOWER(NAME) = LOWER('object_id')
ORDER BY TBNAME
Hope this helps.
Best Regards,
Abdul
|