Grants a role query access to one or more columns in a table.
Available in a network database and requires the star$grant role.
Parameters:
| Name | Optional | Type | Description |
| table$ | Mandatory | Text | Table that contains the columns |
| columns$ | Mandatory | Text | List of columns to grant query access to |
| roles$ | Mandatory | Text | Role to be granted query access |
Examples:
SELECT grant_column('myTable','col1','analyst'); -- grants query access to 'col1' to role 'analyst'
SELECT grant_column('myTable','col1,col2','analyst'); -- grants access to two columns
Tips:
- The star$columns lists columns in existing tables
Comments
Article is closed for comments.