sql - Grant Privileges for Oracle -


i want grant update privileges user tables within schema except update primary keys. there easy way it? or should separately each table , define each column.

how work? im sure there easy way it. i'm reading documentation gives me generic examples.

declare    myquery varchar2(1024); begin   rc in (select * user_tab_cols u   not exists (     select *         user_constraints c       ,user_cons_columns cc             c.constraint_type = 'p'       , c.constraint_name = cc.column_name       , u.table_name = cc.table_name       , u.column_name = cc.column_name   )) loop     myquery := 'grant  update ('||rc.column_name||') on '||rc.table_name||' myuser';     --dbms_output.put_line(myquery);     execute immediate myquery;   end loop; end;   

p.s. i'm not sure "all tables" in description means . in query tables within current schema, if need tables within database change user*** all***, i.e. user_constraints all_constraints, etc.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -