【the waiter】announcement:
Format sql
| | |
Function introduction
- Online sql formatting for multiple databases, supporting multiple database sql formatting (oracle/pg/mysql, etc.)
- Support keyword case
- De-comment
Example
create table if not exists user (
id int not null auto_increment,
name varchar(10) not null comment 'name',
gender tinyint not null default 0 comment 'gender 0-unknown 1-male 2-female',
age int not null comment 'age',
created_date datetime default current_timestamp,
updated_date datetime default current_timestamp on update current_timestamp,
primary key (id)
);
after treatment
CREATE TABLE IF NOT EXISTS user (
id INT NOT NULL auto_increment,
name VARCHAR(10) NOT NULL comment 'name',
gender TINYINT NOT NULL DEFAULT 0 comment 'Gender 0-Unknown 1-Male 2-Femal',
age INT NOT NULL comment 'age',
created_date DATETIME DEFAULT CURRENT_TIMESTAMP,
updated_date DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id)
);