---
title: "Create a new schema"
method: POST
path: "/createSchema"
tags: ["fiddles"]
---

# Create a new schema

`POST /createSchema`

This is used to execute queries within

## Request body

- object
  - `db_type_id` integer — The id of the database type returned from /dbTypes
  - `ddl` string — The statements used to create this particular schema
  - `statement_separator` string — The separator used to separate each statement within the ddl value

## Response `200`

successful operation

- object
  - `error` string — Only defined when unable to create the schema. Details from the database server about the failure
  - `_id` string
  - `short_code` string
  - `schema_structure` object[]
    - `table_type` 'TABLE' | 'VIEW'
    - `table_name` string
    - `columns` object[]
      - `name` string
      - `type` string

---

[API](https://skmtc.dev/zzzprojects/apis/sql-fiddle.md) · [All operations](https://skmtc.dev/zzzprojects/apis/sql-fiddle/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/zzzprojects/sql-fiddle/revisions/b325b8b31739/schema)
