;
-- ---------------------------- -- Records of college -- ---------------------------- INSERT INTO "public"."college" VALUES ('30','10007','北京理工大学','http://www.bit.edu.cn/',null,null); INSERT INTO "public"."college" VALUES ('31','10698','西安交通大学','http://www.xjtudlc.com/',null); INSERT INTO "public"."college" VALUES ('32','11414','中国石油大学(北京)','http://www.cupde.cn/CMS/fxlsy/index.htm',null); INSERT INTO "public"."college" VALUES ('33','10699','西北工业大学','http://www.nwpunec.net/',null); INSERT INTO "public"."college" VALUES ('34','11415','中国地质大学(北京)','http://www.cugbonline.cn/info.do?columnID=249',null); INSERT INTO "public"."college" VALUES ('35','10718','陕西师范大学','http://sde.snnu.edu.cn/',null); INSERT INTO "public"."college" VALUES ('36','','北京大学',null); INSERT INTO "public"."college" VALUES ('37','10030','北京外国语大学','http://www.beiwaionline.com/',null); INSERT INTO "public"."college" VALUES ('38','10008','北京科技大学','http://cr.ustb.edu.cn/',null); INSERT INTO "public"."college" VALUES ('39','10055','南开大学','http://weo.nankai.edu.cn',null); INSERT INTO "public"."college" VALUES ('40','10056','天津大学','http://www.etju.com/',null); INSERT INTO "public"."college" VALUES ('41','10610','四川大学','http://www.scude.cc/',null); INSERT INTO "public"."college" VALUES ('42','西南大学',null); INSERT INTO "public"."college" VALUES ('43','10614','电子科技大学','http://www.remotedu.com/',null); INSERT INTO "public"."college" VALUES ('44','西南科技大学',null); INSERT INTO "public"."college" VALUES ('45','10613','西南交通大学','http://www.xnjd.cn/Index_index.action',null); INSERT INTO "public"."college" VALUES ('46','10422','山东大学','http://jxjw.sdns.wljy.sdu.edu.cn/mh',null); INSERT INTO "public"."college" VALUES ('47','10183','吉林大学','http://dec.jlu.edu.cn/CMS/webucation/index.htm',null); INSERT INTO "public"."college" VALUES ('48','郑州大学',null); INSERT INTO "public"."college" VALUES ('49','中南大学',null); INSERT INTO "public"."college" VALUES ('50','中国传媒大学',null); INSERT INTO "public"."college" VALUES ('52','四川农业大学',null); INSERT INTO "public"."college" VALUES ('53','国家开放大学',null); INSERT INTO "public"."college" VALUES ('54',' ','北京大学医学网络教育学院',null);
-- ---------------------------- -- Alter Sequences Owned By -- ----------------------------
-- ---------------------------- -- Indexes structure for table college -- ---------------------------- CREATE INDEX "IDx_college_college_name" ON "public"."college" USING btree ("college_name");
-- ---------------------------- -- Primary Key structure for table college -- ---------------------------- ALTER table "public"."college" ADD PRIMARY KEY ("college_ID");
1,将输出的PostgreSQL语句输出的表结构和文本内容放在word上边,然后在使用Notepad++打开或者直接打开word文本 (1)将“public". 字段替换为空 (2)删除 nextval() 函数信息 (3)将ColLATE 替换为空 (4)将“”字符替换为MysqL识别的·字符(~号电脑Esc下面的字符) (5)将int4 替换为int(11) (6)将default替换为空 (7)将创建表加上唯一 PRIMARY KEY (`表唯一ID`) (8)将with(oIDs = false)替换为 ENGINE=InnoDB CHARSET=utf8;
这样,执行MysqL语句就可以创建表了,然后在插入数据,你就可以为所欲为了!!!
同样,如何你想MysqL转换为Postgresql,逆向思维就可以了!!! 总结
以上是内存溢出为你收集整理的PostgreSQL转换为Mysql全部内容,希望文章能够帮你解决PostgreSQL转换为Mysql所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)