FileHint

.sql

High risk

SQL script

A text file of SQL statements — queries, DDL, DML — used for backups, migrations, and ad-hoc analysis.

MIME types

  • application/sql
  • text/plain

Category

code

What opens this file

  • psql
  • mysql
  • DBeaver
  • TablePlus
  • VS Code + SQL extension

How to open by OS

Windows

  • SSMS, DBeaver, TablePlus.

Mac

  • DBeaver, TablePlus, Sequel family apps.

Linux

  • psql, mysql, DBeaver.

Ios

  • Nothing native — use browser-based DB clients.

Android

  • None.

Safety notes

  • Running a .sql with DROP TABLE against production is unrecoverable. Diff before applying.
  • Backup dumps can contain password hashes and PII — handle them with the same care as secrets.

Common mistakes

  • Mixed Shift_JIS / UTF-8 encoding corrupts non-ASCII columns. Align dump and database encodings.
  • Hand-applying migrations lets environments drift. Use a migration tool (Flyway, Prisma, Rails Migrations).

Related extensions

References