Difference between revisions of "GRANT"

From wikieduonline
Jump to navigation Jump to search
Line 18: Line 18:
  
 
* List roles: <code>[[\du]]</code>
 
* List roles: <code>[[\du]]</code>
 +
 +
* <code>[[HAS_TABLE_PRIVILEGE]]</code>
 +
* <code>[[HAS_SCHEMA_PRIVILEGE]]</code>
 +
* <code>[[HAS_DATABASE_PRIVILEGE]]</code>
  
 
* [[View GRANTs on Redshift]]: (<code>[[HAS_TABLE_PRIVILEGE]]</code>)
 
* [[View GRANTs on Redshift]]: (<code>[[HAS_TABLE_PRIVILEGE]]</code>)

Revision as of 16:07, 13 December 2021

Example:


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: