How to copy your database schema and paste it into AI-SQL-Chat
Works with MySQL, Oracle, PostgreSQL, SQL Server & more — no export requiredRun a query in your DB, copy the result (tables + columns), and paste it on schema-paste.html in the “Paste schema” field. From that moment, AI-SQL-Chat will generate SQL tailored to your structure.
MySQL / MariaDB (phpMyAdmin)
Quick way to copy the table structure1. Run this query in phpMyAdmin
Go to the SQL tab and paste the query below. Replace your_database with your DB name:
copy SQL
SELECT TABLE_NAME, COLUMN_NAME, DATA_TYPE, IS_NULLABLE, COLUMN_KEY FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'your_database' -- <-- REPLACE ORDER BY TABLE_NAME, ORDINAL_POSITION;
2. Copy the result and paste into AI-SQL-Chat
- After running the query you will see a table with columns.
- Select the entire result (CTRL+A → CTRL+C).
- Go to schema-paste.html and paste into the “Paste schema” textarea.
No export required — just copy the text.
Oracle (SQL Developer)
Simple export by copying1. Run this query in Worksheet
Replace OWNER with your schema name (UPPERCASE):
SELECT OWNER, TABLE_NAME, COLUMN_NAME, DATA_TYPE, DATA_LENGTH, DATA_PRECISION, DATA_SCALE, NULLABLE FROM ALL_TAB_COLUMNS WHERE OWNER = 'HR' -- <-- REPLACE WITH YOUR SCHEMA ORDER BY TABLE_NAME, COLUMN_ID;
Not sure about your schema name? Use SELECT USER FROM dual;
2. Copy the result and paste into AI-SQL-Chat
- Select the full result and copy (CTRL+C).
- Go to schema-paste.html and paste it in the “Paste schema” field.
AI-SQL-Chat will automatically detect tables and columns.
FAQ / Other databases
► PostgreSQL
SELECT table_name, column_name, data_type, is_nullable FROM information_schema.columns WHERE table_schema = 'public' ORDER BY table_name, ordinal_position;
► SQL Server
SELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, DATA_TYPE, IS_NULLABLE FROM INFORMATION_SCHEMA.COLUMNS ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION;
► SQLite
SELECT name, sql FROM sqlite_master WHERE type='table';