Generate CREATE TABLE statements for five SQL dialects, either column by column or inferred from JSON records with the evidence for each type shown.
CREATE TABLE accounts
3 columns, PostgreSQL syntax.
CREATE TABLE accounts ( id bigint PRIMARY KEY GENERATED ALWAYS AS IDENTITY, email varchar(255) NOT NULL UNIQUE, display_name text, created_at timestamptz NOT NULL DEFAULT now(), updated_at timestamptz NOT NULL DEFAULT now() );
CREATE TABLE Generator runs entirely on your device — nothing is uploaded, and no statement is executed.
You’re on the Free plan. Compare plans
Writing a CREATE TABLE by hand means remembering which dialect spells auto-increment which way, and the spellings have nothing in common: PostgreSQL has `SERIAL` or `GENERATED ALWAYS AS IDENTITY`, MySQL has `AUTO_INCREMENT` on the column, SQL Server has `IDENTITY(1,1)`, and SQLite only gives you a rowid alias if the column is exactly `INTEGER PRIMARY KEY`. Pick the dialect and the right one is written for you.
Identifier quoting follows the dialect too, and only where it is needed. A name that is a reserved word or contains a space gets quoted — double quotes in PostgreSQL and SQLite, backticks in MySQL, brackets in SQL Server — and a name that does not is left bare, because quoting everything makes the DDL harder to read and, in PostgreSQL, permanently case-sensitive.
The second mode takes JSON records and works out the columns. Each one reports what was actually seen — "integers, 1 to 4821" or "strings up to 38 characters" — because a type chosen from a sample is only as good as the sample. That evidence is the point: a column that is whole numbers in your first hundred rows and a decimal in row ten thousand is an INTEGER here and a production incident later.
Nullability is inferred the same way and is the likeliest thing to be wrong. A column with no nulls in the sample is marked NOT NULL, which is true of the sample and a guess about the world. The tool says so rather than letting the generated DDL imply more certainty than it has.
Nothing is executed and no database is contacted. The statement is generated as text for you to review and run yourself.
Because it is a different feature in each. PostgreSQL has `SERIAL` and the newer identity columns, MySQL has `AUTO_INCREMENT` as a column attribute, SQL Server has `IDENTITY(1,1)`, and SQLite only auto-assigns when the column is exactly `INTEGER PRIMARY KEY` — `BIGINT PRIMARY KEY` does not do it.
No. Quote the ones that need it — reserved words, names with spaces or capitals you want preserved. In PostgreSQL a quoted identifier is permanently case-sensitive, so quoting `"Users"` means every later query must quote it too.
Treat them as a first draft with the evidence attached. The tool reports what it saw — the range of the integers, the longest string — and that is what tells you whether the sample is representative. It cannot know about the row that has not arrived yet.
Because no record in the sample had a null there. That is an observation about the sample, not a rule about the data, and it is the inference most likely to be wrong on real data.
No. No database is contacted and nothing is executed. You get DDL as text to review.