在线SQL格式化与美化工具 | 支持MySQL/PostgreSQL/Oracle等多数据库 - GoTool在线工具集

开发工具指南

在线多数据库SQL格式化工具,完美支持MySQL、PostgreSQL、Oracle、TiDB、SQL Server等主流数据库。一键自动格式化、排版与美化混乱的SQL查询语句,去除多余注释,大幅提升SQL代码的可读性、一致性和工作效率。

使用说明

功能介绍

1.多数据库在线sql格式化,支持(oracle/pg/mysql等)多种数据库sql格式化
2.支持关键字大小写
3.去注释

示例

create table if not exists user (
    id int not null auto_increment,
    name varchar(10) not null comment '姓名',
    gender tinyint not null default 0 comment '性别 0-未知 1-男 2-女',
    age int not null comment '年龄',
    created_date datetime default current_timestamp,
    updated_date datetime default current_timestamp on update current_timestamp,
    primary key (id)
);

处理后

CREATE TABLE IF NOT EXISTS user (
    id INT NOT NULL auto_increment,
    name VARCHAR(10) NOT NULL comment '姓名',
    gender TINYINT NOT NULL DEFAULT 0 comment '性别 0-未知 1-男 2-女',
    age INT NOT NULL comment '年龄',
    created_date DATETIME DEFAULT CURRENT_TIMESTAMP,
    updated_date DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (id)
);