Skip to main content

CREATE BRANCH Preview

Create a new branch that is based on the current one that you are in.

Syntax
CREATE BRANCH [ IF NOT EXISTS ] <branch_name>
[ AT { REF[ERENCE] | BRANCH | TAG | COMMIT } <refValue> ]
[ IN <catalog_name> ]

Parameters

{{< sql-section file="data/sql/branches.json" data="creatingABranch" >}}

Examples

Create a branch
CREATE BRANCH myBranch
Create a branch at the specified commit
CREATE BRANCH myBranch
AT COMMIT "c7a79c74adf76649e643354c34ed69abfee5a3b070ef68cbe782a072b0a418ba"
Create a branch at the specified branch in the specified catalog
CREATE BRANCH myBranch
AT BRANCH anotherBranch
IN myCatalog