Difference between revisions of "GRANT"

From wikieduonline
Jump to navigation Jump to search
Line 5: Line 5:
  
 
* <code>[[GRANT USAGE]]</code>
 
* <code>[[GRANT USAGE]]</code>
 +
 +
* <code>GRANT USAGE ON ALL SEQUENCES IN [[SCHEMA]] your_schema TO mygrp; </code><ref>https://stackoverflow.com/a/10353730</ref>
 +
  
 
  GRANT your_defined_role TO your_username;
 
  GRANT your_defined_role TO your_username;

Revision as of 08:42, 10 December 2021

Example:

  • GRANT USAGE ON ALL SEQUENCES IN SCHEMA your_schema TO mygrp; [1]


GRANT your_defined_role TO your_username;
GRANT ROLE
SELECT * FROM your_table_name;
ERROR: permission denied for table your_table_name
GRANT SELECT ON mytable TO xxx
  • List roles: \du

Related terms

See also

  • https://stackoverflow.com/a/10353730
  • https://dba.stackexchange.com/a/184339
  • Advertising: