go在線工具集
首頁
搜索
致boss

sql轉markdown文檔
17  |   |   |  0

功能居間

1.支持多種資料庫的建表 sql轉csv, 其中包含(pg、oracle、mysql)等資料庫; 建表語句, 建表語句, 建表語句(重要的說3遍)
2.在轉換 sql 的時候, 需要確認下是否需要切換處理類型, 暫時支持3種處理方式(normal, postgresql, oracle), 默認: normal.


示例

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)
);

處理後

## User

| 序號 | 欄位名       | 類型        | 非空 | 鍵  | 默認值            | 描述                  |
| ---: | ------------ | ----------- | ---- | --- | ----------------- | --------------------- |
|    1 | id           | int         | no   | pri |                   |                       |
|    2 | name         | varchar(10) | no   |     |                   | 姓名                  |
|    3 | gender       | tinyint     | no   |     | 0                 | 性別 0-未知 1-男 2-女 |
|    4 | age          | int         | no   |     |                   | 年齡                  |
|    5 | created_date | datetime    | yes  |     | current_timestamp |                       |
|    6 | updated_date | datetime    | yes  |     | current_timestamp |                       |