statement
GRANT
Assigns a privilege. Use a dedicated role in an isolated database; this example grants reading but not writing. Example target: PostgreSQL 17. Use only the isolated starter dataset; setup and expected results are in the batch evidence.
Formal Syntax & Structure
sql syntaxsql
GRANT SELECT ON TABLE table TO roleWorking Example
Example Snippetsql
CREATE ROLE lab_reader;GRANT SELECT ON TABLE customers TO lab_reader;