1 Reply Latest reply on Apr 29, 2018 4:44 PM by rp0428

    SQL developer

    fb50c086-763e-4915-a3b3-dbad01bf7d75

      So I am trying to create a role, I created the role Test1, but Im having some trouble. Im trying to make it so that it ONLY reads all the table in my database and I been told I need to use a loop like

       

      FOR x IN (SELECT * FROM user_tables)
      LOOP
        EXECUTE IMMEDIATE 'GRANT SELECT ON ' || x.table_name || ' TO <<someone>>';
      END LOOP;

       

      could I get some more clarification? Thank you in advance