Grant statement
A GRANT statement is a database command that assigns specified privileges on database objects or role membership to users, roles, or other principals.
Grokking Relational Database Design
A GRANT statement assigns specified database privileges to a role or user.
- How it is used
- Controls table access by connecting privileges, roles, and users in a role-based access control design.
- How deep it goes
- Explains privilege meanings and demonstrates role creation, grants, user assignment, and default-role activation.
- Examples
- Uses standard_user, analyst, and admin roles across product, purchase, purchase_product, and review tables.
- What you can do after
- Apply it via SQL to create roles, grant table privileges, assign roles, and enable default roles.
Read how Grokking Relational Database Design explains grant statement →
Just Use Postgres!
The GRANT statement is an SQL command that assigns privileges or role membership to a database principal.
- How it is used
- Configures least-privilege database access for an application role operating on behalf of a merchant.
- How deep it goes
- Demonstrates runnable grants and resulting access, stopping short of broader administration or privilege theory.
- Examples
- Uses coffee_chain_admin, product-catalog queries and updates, sequence IDs, and denied connections to brewery and postgres.
- What you can do after
- Operate/configure PostgreSQL roles with database, schema, table, and sequence privileges.
ScyllaDB in Action
A GRANT statement is a database command that assigns permissions or role membership to a role.
- How it is used
- Uses GRANT to authorize application roles for narrowly scoped ScyllaDB resources.
- How deep it goes
- Defines syntax, permission types, resource forms, least-privilege scoping, and role inheritance through runnable commands.
- Examples
- Demonstrates SELECT and MODIFY grants on the reviews keyspace and granting application to reviews_api.
- What you can do after
- Operate/configure ScyllaDB authorization by assigning permissions to roles and composing roles through inheritance.
Related concepts
- PostgreSQLused by · PostgreSQL is an open-source object-relational database management system that implements SQL and supports transactional data storage and extensibility.
- roleconfigures · A role is a defined function, responsibility, perspective, or set of permissions associated with a participant in an organization or system.
- authorizationconfigures · Authorization is the determination and enforcement of rules governing which subjects may access resources or perform operations.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


