User rights

Below are different types of syntaxes to grant user rights

CREATE USER <USERNAME> with PASSWORD '<PASSWORD>';

GRANT SELECT ON ALL TABLES in SCHEMA <SCHEMA_NAME> to <USERNAME>;
-- User rights:

GRANT CONNECT ON DATABASE <DATABSE> TO <USER>;
GRANT USAGE ON SCHEMA <SCHEMA> TO <USER>;
GRANT SELECT ON ALL TABLES IN SCHEMA <SCHEMA> TO <USER>;
GRANT SELECT ON ALL SEQUENCES IN SCHEMA <SCHEMA> TO <USER>;
COMMIT;

Last updated