PostgreSQL轉換為Mysql
1,將輸出的PostgreSql語句輸出的表結構和文本內容放在word上邊,然后在使用Notepad++打開或者直接打開word文本
(1)將“public". 字段替換為空
(2)刪除 nextval() 函數信息
(3)將COLLATE 替換為空
(4)將“”字符替換為mysql識別的·字符(~號電腦Esc下面的字符)
(5)將int4 替換為int(11), int2 替換為int(11)
(6)將default替換為空
(7)將創建表加上唯一 PRIMARY KEY (`表唯一ID`)
(8)將with(oids = false)替換為 ENGINE=InnoDB CHARSET=utf8;
(9) timestamp(6) 修改為datetime
(10) 修改創建 index 語句;create index `idx_name` on `table` using btree(`col_name`); 修改為 aleter table `table` add index `idx_name` (`col_name`) using btree'
