I'm attempting to write a query to build a grant statement for ALL tables in specific databases. So far I have:
'grant select, insert, delete, update, truncate, groom, statistics on '||t.owner||'.'||t.tablename
from _v_table t, _v_database d
where d.database like 'QA_CDWH%'
but need a join key between the tables and the databases.
Can someone please assist?