DEVtoy
語言 · 繁體中文

SQL 格式化工具

格式化 SQL、PostgreSQL、MySQL 或 SQLite 查詢。設定關鍵字大小寫與縮排。

使用方式

  1. 貼上輸入內容或載入下方範例。
  2. 調整選項後按「格式化 SQL」。
  3. 檢查結果後複製或下載。

無需上傳、無需帳號,處理完全於瀏覽器內完成。

輸入範例
select c.id,c.name,count(o.id) as order_count,sum(o.total) as revenue from customers c left join orders o on o.customer_id=c.id where o.status='paid' and o.created_at>='2026-01-01' group by c.id,c.name having sum(o.total)>100 order by revenue desc limit 20

相關工具