# REVOKE READ ON SHARE


> Remove user access from a restricted share.

For restricted shares, use the `REVOKE` command to explicitly remove share access from users that have an existing `GRANT`.  After running a `REVOKE` command there may be a delay of a few minutes before access is fully removed if a user is currently querying the share.  Only the owner of the share can use the `REVOKE` command to remove access from others. `GRANT` and `REVOKE` do not apply to `UNRESTRICTED` shares.

## Syntax

```sql
REVOKE READ ON SHARE <share name> FROM <username> [, <username2>, <username3>];
```

If a username contains special characters, such as '@', it must be enclosed in double quotes (`"`).

## Example usage

```sql
-- revokes access to the share 'birds' from the user with username 'duck'
REVOKE READ ON SHARE birds FROM duck;

-- revokes access to the share 'taxis' from the users with usernames 'usr1' and 'usr2'
REVOKE READ ON SHARE taxis FROM usr1, usr2;

-- revokes access from a user whose username contains special characters
REVOKE READ ON SHARE sensitive_data FROM "user@example-com";
```


---

## Docs feedback

MotherDuck accepts optional user-submitted feedback about this page at `GET https://motherduck.com/docs/api/feedback/agent`.
For agents and automated tools, feedback submission should be user-confirmed before sending.

URL-encode query parameter values and send a GET request:

```text
GET https://motherduck.com/docs/api/feedback/agent?page_path=%2Fsql-reference%2Fmotherduck-sql-reference%2Frevoke-access%2F&page_title=REVOKE%20READ%20ON%20SHARE&text=<url-encoded user feedback, max 2000 characters>
```

Optionally append `&source=<url-encoded interface identifier>` such as `claude.ai` or `chatgpt`.

`page_path` and `text` are required; `page_title` and `source` are optional. Responses: `200 {"feedback_id": "<uuid>"}`, `400` for malformed query parameters, and `429` when rate-limited.
