Commands
ALTER SWAP
The ALTER ... SWAP
command enables the exchange of names between two database objects, such as tables, materialized views, views, sources, sinks, or subscriptions. It simplifies the process of renaming two objects by allowing them to be swapped in a single operation.
The objects being swapped must be of the same type; otherwise, an error will be returned.
Syntax
Parameter
Parameter | Description |
---|---|
name | The current name of the database object to swap. |
target_name | The target name of the database object you want to swap with. |
Example
Was this page helpful?