SQL: CREATE TABLE
A short, tested SQL example for create table. Copy it and adjust the names and paths for your project.
SQL
CREATE TABLE orders (
id BIGINT PRIMARY KEY,
customer_id BIGINT NOT NULL REFERENCES customers(id),
total NUMERIC(10, 2) NOT NULL CHECK (total >= 0),
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);Find it in Zest
Search for “sql create table” in Zest and this example appears above the results, with other matches to choose from. Searches stay private.