如何将mssql脚本转换为mysql [英] How to convert mssql script to mysql

查看:443
本文介绍了如何将mssql脚本转换为mysql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将脚本从MS SQL Server转换为MySql.

I tried to convert script from MS SQL Server to MySql.

我找不到任何方便的方法来进行这种转换.

I couldn't find any convenience approach to do this conversion.

我尝试了这个从MS SQL Server到MySQL的转换在线转换器,但是它存在很多错误句法.

I tried this MS SQL Server to MySQL Conversion online converter but it has a lot of mistakes at syntax.

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IDENTITY(1,1) NOT NULL,
`address` varchar(255) NOT NULL,
`date_added` datetime N' at line 2

这是我需要转换的文件内容 pastebin-脚本

Here is content of the file that I need to convert pastebin - script

  • 是否存在进行这种转换但没有安装特殊工具的更好的方法?

推荐答案

您不只是将TSQL转换"为MySQL的SQL代码.您需要了解不同的数据类型,列约束等.您遇到了许多障碍中的第一个:MySQL使用

You don't just "convert" TSQL to SQL code for MySQL. You need to know the different datatypes, column constraints, etc. You hit the first of many roadblocks: MySQL uses AUTO_INCREMENT instead of SQL Server's IDENTITY field constraint.

有实用程序,但是您仍然应该了解这些更改是什么,因为它们会影响很多事情(包括性能和针对DB的未来开发).与其他几则帖子重复(删除了死链接).

There are utilities, but you should still understand what the changes are, as they'll affect many things (including performance and future development against the DB). Duplicate of several other posts (dead link removed).

这篇关于如何将mssql脚本转换为mysql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆