How to write a query that obtains a script to remove the privilege of deleting records in some table of the user c##test_user to the users who have it?.
I tried this query:
SELECT GRANTEE, TABLE_NAME
FROM DBA_TAB_PRIVS
WHERE PRIVILEGE ='DELETE'
AND TABLE_NAME IN (SELECT TABLE_NAME
FROM ALL_TABLES
WHERE OWNER = 'c##test_user');
The problem is that I do not know how to generate the script from the select. Any ideas?. Thank you