This tool provides a solution for automatically converting multiple database SQL into DML code, and supports INSERT, UPDATE, and DELETE operations. Suitable for mainstream databases such as MySQL, PostgreSQL, and Oracle. This tool simplifies the SQL conversion process and aims to significantly improve work efficiency, help developers quickly generate and manage data operation codes, and optimize database maintenance and data migration processes.
使用说明
Function introduction
- Support the conversion of tables from sql to dml for multiple databases, including (pg, oracle, mysql) and other databases; table creation statements, table creation statements, table creation statements(Say the important three times)
- When converting sql, you need to confirm whether you need to switch processing types. Three processing methods are temporarily supported (normal, postgresql, oracle). Default: normal.
- Support custom filtering of unnecessary fields. Multiple fields are separated by ,
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-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)
);
After insert processing
INSERT INTO user (name,gender,age,created_date,updated_date) VALUES (?,?,?,?,?)
After update processing
UPDATE user SET name=?, gender=?, age=?, created_date=?, updated_date=? WHERE id=?
After select processing
SELECT id,name,gender,age,created_date,updated_date FROM user WHERE id=?