GO Online Toolset
home
search
To Boss

SQL to markdown document
new
58  |   |   |  0

###Function introduction

  1. Support SQL to csv table creation for multiple databases, including (pg, oracle, mysql) and other databases; ** table creation statements **, ** table creation statements **, ** table creation statements **(Say the important three times)
  2. 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.

###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 treatment

## User

| serial number | field name   | type        | non-empty | key | default value     | described                        |
| ------------: | ------------ | ----------- | --------- | --- | ----------------- | -------------------------------- |
|             1 | id           | int         | NO        | PRI |                   |                                  |
|             2 | name         | varchar(10) | NO        |     |                   | name                             |
|             3 | gender       | tinyint     | NO        |     | 0                 | Gender 0-Unknown 1-Male 2-Female |
|             4 | age          | int         | NO        |     |                   | age                              |
|             5 | created_date | datetime    | YES       |     | CURRENT_TIMESTAMP |                                  |
|             6 | updated_date | datetime    | YES       |     | CURRENT_TIMESTAMP |                                  |