# ALTER …​ OWNER TO

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

---
title: ALTER …​ OWNER TO
latest-operator-version: v26.2.6
latest-console-tag: v3.14.0
latest-connect-version: 4.117.0
latest-redpanda-tag: v26.2.6
docname: sql/sql-statements/alter-owner
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: sql/sql-statements/alter-owner.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/reference/pages/sql/sql-statements/alter-owner.adoc
description: The ALTER ... OWNER TO statement transfers ownership of a view or a schema to another role.
page-topic-type: reference
page-git-created-date: "2026-10-23"
page-git-modified-date: "2026-10-23"
page-generated-content: none
---

<!-- Source: https://docs.redpanda.com/cloud-data-platform/reference/sql/sql-statements/alter-owner.md -->

The `ALTER …​ OWNER TO` statement transfers ownership of a view or a schema to another role. Transfer ownership when a role leaves, or when a different role must manage an object.

## [](#syntax)Syntax

```sql
ALTER TABLE [schema_name.]view_name OWNER TO { role_name | CURRENT_USER | CURRENT_ROLE };
ALTER SCHEMA schema_name OWNER TO { role_name | CURRENT_USER | CURRENT_ROLE };
```

-   `view_name`: Name of the view. Use `ALTER TABLE` to change the owner of a view. Redpanda SQL has no `ALTER VIEW` statement. The `schema_name.` prefix is optional. If you omit it, Redpanda SQL finds the view through the search path.

-   `schema_name`: Name of the Redpanda SQL schema, such as `public`. See [SQL Schemas](https://docs.redpanda.com/cloud-data-platform/reference/sql/schema/).

-   `role_name`: Name of the role that becomes the new owner. The role must exist.

-   `CURRENT_USER` or `CURRENT_ROLE`: Makes the role that runs the statement the new owner.


The `ALTER TABLE …​ OWNER TO` statement does not accept the `catalog=>` form. You cannot change the owner of a table in a Redpanda catalog or an Iceberg catalog with this statement. If the statement names a catalog connection, such as `default_redpanda_catalog`, it fails with `relation "<catalog-name>" does not exist`.

## [](#behavior)Behavior

-   The statement changes only the owner. It does not change the object’s privileges for other roles.

-   If the role is already the owner, the statement does nothing.

-   A view runs its query with the privileges of its owner. See [CREATE VIEW permissions](https://docs.redpanda.com/cloud-data-platform/reference/sql/sql-statements/create-view/#permissions). When you change the owner of a view, the view reads data with the privileges of the new owner. The new owner must be able to read each table that the view reads. If not, queries of the view fail for every user.

-   You cannot drop a role that owns objects. [DROP USER](https://docs.redpanda.com/cloud-data-platform/reference/sql/sql-statements/drop-user/) fails with `role "<role_name>" cannot be dropped because some objects depend on it`. The error lists the objects that the role owns. To drop the role, first transfer ownership of its views and schemas or drop them, drop any catalog connections and storage definitions it owns, and revoke its grants.

-   In Redpanda Cloud, when a user loses access to Redpanda SQL, the user’s role and the objects that the role owns remain.


## [](#permissions)Permissions

The current owner of the object or a superuser can change its owner. Other roles receive the error `must be owner to alter owner`.

In Redpanda Cloud, a user with the **SQL: Manage** permission is a superuser. See [Manage access to Redpanda SQL](https://docs.redpanda.com/cloud-data-platform/sql/manage/manage-access/).

## [](#examples)Examples

Change the owner of the `large_orders` view in the `public` schema:

```sql
ALTER TABLE public.large_orders OWNER TO "alice@example.com";
```

As a superuser, take ownership of the `analytics` schema:

```sql
ALTER SCHEMA analytics OWNER TO CURRENT_USER;
```

Before you drop the user `bob@example.com`, transfer ownership of the views and schemas that the user owns. This example transfers the view `large_orders` to `alice@example.com`:

```sql
ALTER TABLE large_orders OWNER TO "alice@example.com";
```

Then drop any catalog connections and storage definitions that the user owns, and revoke the user’s grants. To drop the user, see [DROP USER](https://docs.redpanda.com/cloud-data-platform/reference/sql/sql-statements/drop-user/).

## [](#suggested-reading)Suggested reading

-   [DROP USER](https://docs.redpanda.com/cloud-data-platform/reference/sql/sql-statements/drop-user/)

-   [CREATE SCHEMA](https://docs.redpanda.com/cloud-data-platform/reference/sql/sql-statements/create-schema/)

-   [GRANT](https://docs.redpanda.com/cloud-data-platform/reference/sql/sql-statements/grant/)

-   [Manage access to Redpanda SQL](https://docs.redpanda.com/cloud-data-platform/sql/manage/manage-access/)