I want to do something that's conceptually simple but seems to be a lot more complex in reality.
Basically, whenever a new table is created for a couple of users in our database, I want to grant select permissions to a role. Basically this:
grant select on TABLENAME to READROLE;
So far my trigger looks something like this:
CREATE OR REPLACE TRIGGER osmm_grant_on_creation
AFTER CREATE ON OSMM.SCHEMA
BEGIN
//grant goes here
END
Problem is, I can't figure out how to join the two together by getting the name of the newly created table and referencing it through the trigger to the grant. Any suggestions? Thanks.