Sean Lange (7/9/2013)
ummm....tables do not reside inside of a user or a role. They exist in the database, access to those tables is handled by the permissions granted to users and/or roles.
Do you get an error when you run this?
SELECT COLUMN_NAME, TABLE_NAME
FROM INFORMATION_SCHEMA.COLUMNS
i think he's very oracle oriented.
I tend to use the Oracle or SQL related views, instead of the information_schema stuff;
so for example, in oracle, i'd query user_tab_cols; in SQL, i'd query sys.columns directly
--ORACLE
select * from user_tab_cols where column_name='ACTTBLKEY';
--SQL-
SELECT OBJECT_NAME(object_id) As TABLE_NAME,* from sys.columns WHERE name = 'ACTTBLKEY';
Lowell