Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/en/guides/56-security/access-control/01-privileges.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Databend offers a range of privileges that allow you to exercise fine-grained co
| ALL | All | Grants all the privileges for the specified object type. |
| ALTER | Global, Database, Table, View | Alters a database, table, user or UDF. |
| CREATE | Global, Table | Creates a table or UDF. |
| CREATE DATABASE | Global | Creates a database, table or UDF. |
| CREATE DATABASE | Global | Creates a database or UDF. |
| CREATE WAREHOUSE | Global | Creates a warehouse. |
| DELETE | Table | Deletes or truncates rows in a table. |
| DROP | Global, Database, Table, View | Drops a database, table, view or UDF. Undrops a table. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ Create a database.
CREATE [ OR REPLACE ] DATABASE [ IF NOT EXISTS ] <database_name>
```

## Access control requirements

| Privilege | Object Type | Description |
|:----------------|:------------|:--------------------|
| CREATE DATABASE | Global | Creates a database. |


To create a database, the user performing the operation or the [current_role](/guides/security/access-control/roles) must have the CREATE DATABASE [privilege](/guides/security/access-control/privileges).

## Examples

The following example creates a database named `test`:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,16 @@ When choosing between stored computed columns and virtual computed columns, cons

Databend's syntax is difference from MySQL mainly in the data type and some specific index hints.

## Access control requirements

| Privilege | Object Type | Description |
|:----------|:--------------|:-----------------------|
| CREATE | Global, Table | Creates a table. |


To create a table, the user performing the operation or the [current_role](/guides/security/access-control/roles) must have the CREATE [privilege](/guides/security/access-control/privileges#table-privileges).


## Examples

### Create Table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,15 @@ copyOptions ::=
| `SIZE_LIMIT = <num>` | Number (> 0) that specifies the maximum rows of data to be loaded for a given COPY statement. Default `0` | Optional |
| `PURGE = <bool>` | True specifies that the command will purge the files in the stage if they are loaded successfully into table. Default `false` | Optional |


## Access control requirements

| Privilege | Object Type | Description |
|:----------|:--------------|:--------------------------------------------------------------------------|
| SUPER | Global, Table | Operates a stage(Lists stages. Creates, Drops a stage), catalog or share. |

To create a stage, the user performing the operation or the [current_role](/guides/security/access-control/roles) must have the SUPER [privilege](/guides/security/access-control/privileges).

## Examples

### Example 1: Create Internal Stage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ CREATE [ OR REPLACE ] FUNCTION [ IF NOT EXISTS ] <function_name>
[ DESC='<description>' ]
```

## Access control requirements

| Privilege | Object Type | Description |
|:----------|:--------------|:---------------|
| SUPER | Global, Table | Operates a UDF |

To create a user-defined function, the user performing the operation or the [current_role](/guides/security/access-control/roles) must have the SUPER [privilege](/guides/security/access-control/privileges).

## Examples

See [Usage Examples](/guides/query/udf#usage-examples).
Loading