./prontouso.com
CÔNG CỤ LẬP TRÌNH

Định Dạng Truy Vấn SQL

Định dạng và thụt lề câu lệnh truy vấn SQL cho nhiều hệ quản trị cơ sở dữ liệu (MySQL, PostgreSQL, Oracle, SQLite, SQL Server). Tùy chỉnh viết hoa từ khóa.

Trạng thái công cụChạy trên trình duyệt của bạn
Xem trước

Dữ liệu đầu ra

SQL formatted for readability.

Cách thức hoạt động

  1. Nhập dữ liệu của bạn

    Điền các giá trị cần thiết, dán văn bản hoặc tải lên tệp bạn muốn xử lý.

  2. Xem kết quả tức thì

    Hầu hết các công cụ cập nhật theo thời gian thực khi bạn nhập liệu; một số công cụ sử dụng một nút hành động duy nhất.

  3. Sử dụng kết quả

    Sao chép, tải xuống hoặc chia sẻ kết quả được tạo — bạn luôn có toàn quyền kiểm soát dữ liệu của mình.

Quyền riêng tư & xử lý dữ liệuChạy cục bộ 100% trên trình duyệt của bạn. Công cụ này không tải dữ liệu của bạn lên máy chủ.

Định Dạng Truy Vấn SQL là gì?

Paste compact or messy SQL and make common clauses easier to read without sending the query anywhere.

TÌM HIỂU CÁCH HOẠT ĐỘNG CỦA CÔNG CỤ

How to format SQL

Readable SQL

The formatter normalizes whitespace, uppercases common keywords, and places major clauses on their own lines.

Format or minify

  • Use format mode when reading or sharing a query.
  • Use minify mode when you only need normalized single-line SQL.
  • Review important queries before running them in production.

Scope

This is a lightweight formatter for common SQL. It is not a full database-specific parser.

SQL formatting notes

The formatter improves readability for common clauses and quoted strings, but it does not parse every dialect or execute the query.

Các Câu Hỏi Thường Gặp (FAQ)

Does it execute SQL?

No. It only formats text in the browser.

Will it support every SQL dialect?

No. It targets common SQL readability, not complete dialect validation.

Are strings preserved?

Whitespace inside quoted strings is preserved while surrounding SQL is normalized.

Are quoted strings changed?

No. Whitespace normalization, keyword casing, and line breaks are applied outside quoted strings only.

Công Cụ Liên Quan