CREATE BRANCH#

Synopsis#

CREATE BRANCH [ OR REPLACE ] [ IF NOT EXISTS ] branch_name
[ WITH ( property_name = expression [, ...] ) ]
IN TABLE table_name
[ FROM source_branch ]

Description#

Create a branch or tag.

The optional OR REPLACE clause causes an existing branch or tag with the specified name to be replaced with the new branch or tag definition. Support for branch and tag replacement varies across connectors. Refer to the connector documentation for details.

The optional IF NOT EXISTS clause causes the error to be suppressed if the branch already exists.

The optional WITH clause can be used to set properties on the newly created branch and tag.

The optional FROM clause can be used to set the source branch from which the new branch is created.

Examples#

Create a new branch audit in the table orders:

CREATE BRANCH audit IN TABLE orders

Create a new branch or table audit in the table orders from the branch dev:

CREATE BRANCH audit IN TABLE orders FROM dev

See also#