# createSchema {#createSchema}

## Syntax {#Syntax .section}

`createSchema(catalog, dbUrl, schema)`

## Arguments {#Arguments .section}

**catalog**is a string specifying the catalog name.

**dbUrl** is a string indicating the database URL.

**schema** is a string indicating the schema name.

## Details {#Details .section}

Add a database to a catalog. Note that a database can only be added to one catalog.

The *dbUrl*of a database is unique globally, while the schemas under difference catalogs can share the same names. When adding a database to a catalog, a schema name must be specified. Operations on this schema must use this name instead of *dbUrl*.

## Examples {#Examples .section}

``` {#codeblock_pvr_4cb_pbc}
createSchema("catalog1", "dfs://db1", "schema1")
```

**Parent topic:**[Functions](../../Functions/category.md)

