.sql File — SQL Script
application/sql
Drop any file to identify its extension and type — runs entirely in your browser
Drop a .sql file here or click to choose
Or drop any file to identify its extension
application/sqlQuick Facts
| Extension | .sql |
| Full Name | SQL Script |
| MIME Type | application/sql |
| Category | Code |
| Type | Text-based (human-readable) |
| Typical Size | 1 KB – 10 MB |
| First Appeared | 1974 |
What Is a .sql File?
SQL (Structured Query Language) files contain database queries, schema definitions, data manipulation statements, and stored procedures written in the standard language for relational database management. SQL was developed at IBM in the 1970s based on Edgar Codd's relational model and has been an ISO/ANSI standard since 1986. SQL files can contain DDL (Data Definition Language) statements for creating and modifying database structures, DML (Data Manipulation Language) for querying and modifying data, DCL (Data Control Language) for managing permissions, and TCL (Transaction Control Language) for managing transactions. SQL is used with virtually every relational database system including PostgreSQL, MySQL, MariaDB, SQLite, Oracle, SQL Server, and DB2. While the core SQL standard is shared, each database system implements extensions and dialect-specific features. SQL files are used for database migrations, seed data, backup/restore operations, reporting queries, and stored procedure definitions. Modern SQL supports window functions, common table expressions (CTEs), recursive queries, JSON operations, and full-text search. SQL remains the most important language for data management and analysis in the world.
How to Open .sql Files
Related File Extensions
More Code File Extensions
Other code formats you might encounter
Browse File Extensions by Category
Explore our reference of 259 file extensions with details, programs, and related formats.