select distinct 'GRANT '|| privilege ||' ON '||owner||'.'||table_name||' TO DC4UI_APP_RW;' from dba_tab_privs where grantee='DC4UI_APP_RW' AND table_name not in (SELECT DISTINCT table_name from dba_tab_privs where grantee = 'DC4UISANDBOX_APP_RW');
