Skip to main content

Paste SQL

Paste SQL directly into TalkingSchema to import a schema without creating a file.

Steps

  1. Click the Import button in the top toolbar
  2. Select Paste SQL
  3. Paste your SQL into the text area
  4. Click Import
  5. TalkingSchema parses the SQL and populates the ERD

What to paste

Paste any SQL containing CREATE TABLE statements:

CREATE TYPE carbon_tier AS ENUM ('A', 'B', 'C', 'D');

CREATE TABLE suppliers (
id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
carbon_tier carbon_tier NOT NULL DEFAULT 'C',
country VARCHAR(100),
is_active BOOLEAN NOT NULL DEFAULT TRUE,
created_at TIMESTAMP NOT NULL DEFAULT NOW()
);

CREATE TABLE products (
id SERIAL PRIMARY KEY,
supplier_id INTEGER NOT NULL REFERENCES suppliers(id),
name VARCHAR(255) NOT NULL,
sku VARCHAR(100) NOT NULL UNIQUE,
carbon_intensity_score DECIMAL(5,2) NOT NULL DEFAULT 0,
unit_price DECIMAL(10,2) NOT NULL DEFAULT 0,
created_at TIMESTAMP NOT NULL DEFAULT NOW()
);

Use cases

  • Copy schema from your database GUI (pgAdmin, TablePlus, DBeaver)
  • Import from a migration file snippet
  • Try TalkingSchema with an existing schema without uploading a file