怎么把mysql转换mssql_如何将MYSQL查询转换为MSSQL查询

bd96500e110b49cbb3cd949968f18be7.png

I've 700+ MySQL queries and now trying to create same set of queries in MSSQL.

I want to generate MSSQL query with same MYSQL.Is any way to convert MYSQL query into MSSQL query.

解决方案

From this article by Brian Swan, you can download the SQL Server Migration Assistant for MySQL tool and use it to convert a single MySQL query to a SQL Server query:

Create a Project: All the information you need for downloading SSMA, creating a project and connecting to databases is in steps 1-6 of this blog post.

In the MySQL Metadata Explorer, navigate to the Statements directory of your MySQL database:

RmQkT.png

Paste the query you want to convert into the query editor window, e.g:

SELECT post_title, post_date FROM wp_posts ORDER BY post_date LIMIT 5 OFFSET 5;

x5AyT.png

Back in the MySQL metadata explorer, right-click Statements and select Convert Schema:

9WayA.png

When prompted to save changes, select Yes:

Qdu3T.png

Copy the converted query from the SQL Server query editor window:

BUVK3.png

Note that SSMA will not successfully translate all MySQL queries, but it does for most. It does not translate some MySQL-specific functions (for example FOUND_ROW()).

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值