SQL (Structured Query Language script)
An .sql file is a plain-text script written in SQL (Structured Query Language), the standard language for relational databases. It can contain statements that create tables, insert rows, update data or run queries. Tools such as mysqldump and pg_dump export whole databases as .sql files, although each database system adds its own dialect.
Use SQL files to back up or migrate a database, to share a schema with your team or to keep database changes under version control. When importing, make sure the script matches the dialect of your database, as MySQL, PostgreSQL and SQLite syntax differ in places.
Source formats: .sql