Search Ctrl K
Home / Tools
THE FEUTEX TOOLKIT

Online SQL Generator: CREATE TABLE

Generate CREATE TABLE SQL for MySQL, PostgreSQL, SQLite, and SQL Server from a simple column list. Add primary keys, identity/auto-increment, defaults, and IF NOT EXISTS.

SQLite ignores schema; MySQL treats it like database.

Columns input

Tip: you can also use TAB-separated values.

Generated SQL

Privacy: runs locally in your browser. No uploads, no tracking scripts.

How to use

Input format: one column per line using comma (or tab) separated fields:

name,type,constraints,default

Constraints can include tokens like: pk, ai, notnull, unique. Put defaults in the 4th field (raw SQL, e.g. CURRENT_TIMESTAMP or 'text').

  1. Choose a SQL dialect and enter a table name (optional schema).
  2. Paste columns into the input box (one per line).
  3. Click Generate SQL, then copy or download.

FAQ

What input format does this CREATE TABLE generator accept?

Use one column per line: name,type,constraints,default (comma- or tab-separated). Constraints are simple tokens like pk, ai, notnull, unique.

How do I set a default value?

Put it in the 4th field as raw SQL, e.g. CURRENT_TIMESTAMP or 'active'. SQL Server defaults are wrapped as DEFAULT (...).

How is auto-increment handled across databases?

MySQL uses AUTO_INCREMENT, PostgreSQL uses GENERATED BY DEFAULT AS IDENTITY, SQL Server uses IDENTITY(1,1), and SQLite uses inline INTEGER PRIMARY KEY AUTOINCREMENT when applicable.

Can it generate composite primary keys?

Yes. Mark multiple columns with pk and the tool emits a table-level PRIMARY KEY (col1, col2).

What does “safe create / IF NOT EXISTS” do?

It avoids errors when the table already exists. SQL Server uses an IF OBJECT_ID(...) IS NULL wrapper; other dialects use CREATE TABLE IF NOT EXISTS.

Does this tool validate my SQL types?

No—types are used as you enter them. If you want checks for common mistakes, use the linked SQL Checker tool.

Is this tool client-side and private?

Yes. It runs in your browser and doesn’t send your input over the network.

Continue your workflow

Browse related tools by task. Use the improved core tools for a consistent workspace with file import, downloads and clear validation errors.