> For the complete documentation index, see [llms.txt](https://til.duyet.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://til.duyet.net/db/aws-redshift-postgres/redshift-grant.md).

# Redshift - GRANT

Grant all on schema to user\_name:

```sql
GRANT ALL
ON SCHEMA schema_name
TO user_name;


GRANT ALL PRIVILEGES
ON ALL TABLES IN SCHEMA schema_name
TO user_name;
```

```sql
-- Grant Usage permission to Read-Only Group to specific Schema
GRANT USAGE ON SCHEMA "ro_schema" TO GROUP ro_group;

-- Grant Select permission to Read-Only Group to specific Schema
GRANT SELECT ON ALL TABLES IN SCHEMA "ro_schema" TO GROUP ro_group;
```

Change owner:

```sql
ALTER TABLE
    <schema>.<table> OWNER TO <user>;
```
