.DDL

DDL File

SQL Data Definition Language Script
Ask a question
QUICK ANSWER

A DDL file is a plain-text SQL script containing Data Definition Language statements such as CREATE TABLE, ALTER TABLE, and DROP TABLE. Open it in any text editor or SQL editor like VS Code or DBeaver. It is functionally identical to a .sql file - the extension is a naming convention.

Developer: N/A (DDL is a category of the SQL standard, ISO/IEC 9075) Category: Database Files Open standard MIME: application/sql
OPENS ON Windows macOS Linux
Related: .DB · .DBF · .ACCDB · .SQL

On this page

19k+ extensions indexed
Last reviewed Jul 25, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the DDL file format?

A .ddl file is a plain-text SQL script containing Data Definition Language statements - the subset of SQL that defines, modifies, or removes database structures. It is functionally a .sql file distinguished by convention: the .ddl extension signals that the script contains schema-definition statements rather than data manipulation. Core statements include CREATE TABLE, ALTER TABLE, DROP TABLE, CREATE INDEX, CREATE VIEW, and CONSTRAINT definitions.

DDL is distinct from DML (Data Manipulation Language: INSERT, UPDATE, DELETE) and DQL (SELECT). Many tools - MySQL Workbench, DBeaver, SQL Server Management Studio - can export a database schema as a .ddl file, and JPA/ORM frameworks such as EclipseLink auto-generate .ddl scripts from entity mappings.

The file has no binary signature; it is identified by extension and content. Encoding is UTF-8 or ASCII; legacy Windows tools may produce Windows-1252. A script often begins with a comment header (-- or /* */) generated by the exporting tool, followed by sequential SQL statements.

File size ranges from a few kilobytes for simple schemas to tens of megabytes for full enterprise database dumps. Because syntax is DBMS-specific - MySQL, PostgreSQL, Oracle, SQL Server, and SQLite each have dialect differences - a .ddl file is not guaranteed to be portable across database engines without modification.

Security & safety

RISK: LOW

A .ddl file is plain text and cannot execute itself. It is safe to open in any text editor. The risk is in RUNNING it: DDL statements (especially DROP TABLE) modify or destroy database structure. Always review a DDL script before executing, ensure you have a backup, and only run it against the intended database instance. DDL from an untrusted source could drop tables or add backdoor accounts - treat it like any executable code.

Format details

in a nutshell
FULL NAMESQL Data Definition Language Scriptaka DDL script, Database schema file
DEVELOPERN/A (DDL is a category of the SQL standard, ISO/IEC 9075)since SQL DDL concepts introduced with SQL-86 (ISO/IEC 9075:1987); .ddl extension is a convention, not a standard
MIME TYPEapplication/sql
TYPEplain-text SQL script containing schema-definition statements
STANDARDOpen · royalty-free
This extension is also used by…
  • SoftQuad / SGML DDL (Document Type Definition Link) - Historic SGML-related schema definition; negligible modern usage, unrelated to SQL.
  • Oracle DDL Export - Oracle Database tools (SQL Developer, Data Pump) export schema definitions as .ddl files in Oracle SQL syntax; same concept, specific to Oracle.

Programs that open DDL files

Windows7 apps
Windows Notepad Built-in Opens the raw SQL text; no syntax highlighting but sufficient for reading or small edits.
MySQL Workbench Open-source File > Open SQL Script to view and execute a MySQL DDL script.
Notepad Open-source Open the .ddl - Notepad++ applies SQL syntax highlighting. Good for quick reading and editing.
VS Code Free Open the .ddl - VS Code applies SQL syntax highlighting automatically and can execute statements with a database extension (e.g. SQLTools).
DBeaver Open-source Open the .ddl in the SQL editor; DBeaver provides syntax highlighting and can execute the script against a connected database.
SQL Server Management Studio (SSMS) Free File > Open > File, then execute the DDL against a SQL Server instance. Best for T-SQL DDL scripts.
EclipseLink (Eclipse IDE) Open-source JPA/EclipseLink generates .ddl from entity classes (persistence.xml ddl-generation setting). Run the generated DDL in any SQL client.
macOS3 apps
VS Code Free Open the .ddl with SQL syntax highlighting; use the SQLTools extension to execute against a database.
DBeaver Open-source Open the .ddl in DBeaver's SQL editor and execute against any connected database (MySQL, PostgreSQL, Oracle, etc.).
TablePlus Freemium Open the .ddl in the SQL editor and run it against your database connection.
Linux2 apps
VS Code Free Open and edit the .ddl with SQL syntax highlighting; execute via SQLTools extension.
DBeaver Open-source Cross-platform SQL editor; open the .ddl and execute it.

Technical details

deep spec
EncodingPlain text - UTF-8 (modern tools), ASCII or Windows-1252 (legacy scripts)
Byte orderNot applicable - text file
ContainerNone - single flat text file with line-delimited SQL statements
Magic bytesNone - identified by extension and SQL keyword structure; no binary signature
Typical size1 KB - 50 MB (simple table scripts: a few KB; full enterprise schema dumps: tens of MB)
SQL subsetDDL - CREATE, ALTER, DROP, TRUNCATE, RENAME, and CONSTRAINT definitions; schema structure only, not data
Dialect dependencySyntax varies by DBMS (MySQL, PostgreSQL, Oracle, SQL Server, SQLite); scripts are not guaranteed portable across engines without modification
Standard basisDDL standardised in ANSI SQL-86 (ISO/IEC 9075:1987); current standard SQL:2023 (ISO/IEC 9075:2023)
ORM integrationEclipseLink, Hibernate, and other JPA frameworks can auto-generate .ddl scripts from entity class mappings
Comment conventionsTool-generated file headers use -- single-line or /* */ block SQL comments; inline comments follow the same conventions
Export supportMySQL Workbench, DBeaver, pgAdmin, SSMS, and Oracle SQL Developer can export database schema directly as .ddl scripts
Import workflowExecuted against a target database using command-line clients (mysql, psql, sqlcmd, sqlite3) or GUI tools; statements run sequentially
Relation to .sqlFunctionally identical; .ddl signals schema-only content (no data manipulation) by developer convention
PortabilityNot guaranteed portable across DBMS engines without dialect-specific modification
ReleasedSQL DDL concepts introduced with SQL-86 (ISO/IEC 9075:1987); .ddl extension is a convention, not a standard
Latest versionSQL:2023 (ISO/IEC 9075:2023)
Open standardYes · royalty-free
Specificationwww.iso.org

DDL conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with DDL files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about DDL files.

Frequently asked questions

What is a .ddl file?
A DDL file is a plain-text SQL script containing Data Definition Language statements - CREATE TABLE, ALTER TABLE, DROP TABLE, CREATE INDEX, etc. - that define or modify the structure of a database. It is functionally identical to a .sql file.
How do I open a .ddl file?
Any text editor works (Notepad, VS Code, Notepad++). To execute it against a database, use DBeaver, SQL Server Management Studio, MySQL Workbench, or any SQL client that can connect to your database and run a SQL script.
What is the difference between DDL and DML?
DDL (Data Definition Language) defines the database structure: CREATE TABLE, ALTER, DROP. DML (Data Manipulation Language) manipulates data: SELECT, INSERT, UPDATE, DELETE. A .ddl file normally contains only DDL statements.
How do I run a .ddl script?
Connect to your target database in a SQL client (DBeaver, SSMS, MySQL Workbench, psql, sqlcmd), open the .ddl file, and execute it. Warning: DROP TABLE statements delete existing tables and their data - review the script first.
What is the difference between .ddl and .sql?
Functionally none - both are plain-text SQL files. The .ddl extension is a naming convention some teams use to indicate that the file contains only schema-definition (DDL) statements, as opposed to .sql files that may contain any SQL. Both open with the same tools.
What generated my .ddl file?
Common sources: Java ORM frameworks (Hibernate, EclipseLink) auto-generating a schema from entity classes; database reverse-engineering tools exporting an existing schema; or a DBA writing it manually for version control.

References

1ISO - SQL:2023 Standard (ISO/IEC 9075)www.iso.org
2Wikipedia - Data Definition Languageen.wikipedia.org

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.BINCD/DVD Disc Image (BIN/CUE)
3.MDMarkdown Document
4.RPMSGRestricted Permission Message
5.PARTPartial Download File
6.CRDOWNLOADChrome Partial Download File
7.NOMEDIAAndroid No-Media Marker File
8.PRDXSoftMaker Presentations Document
9.SWFSmall Web Format (Shockwave Flash)
10.PRO6XProPresenter 6 Bundle File

Related extensions

.DBSQLite Database File
.DBFDatabase File (dBASE / xBase table)
.ACCDBMicrosoft Access Database (2007+)
.SQLSQL Script (Structured Query Language source / database dump)
.MDBMicrosoft Access Database (97-2003, Jet engine)
.FDBFirebird Database

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z