Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert T-SQL to MySQL

Tags:

tsql

mysql

Is there an easy way to convert Transact-SQL to MySQL?


I am attempting to convert a database archive of stock ticker symbols and company names.

like image 594
Derek Adair Avatar asked Jun 06 '10 23:06

Derek Adair


2 Answers

The short answer: NO

The medium answer: MAYBE

The long answer: That depends on what's in your TSQL and how much time and effort you want to put into it.

TSQL is not a subset of MySQL's dialect. So there exists some TSQL for which there is no MySQL conversion. However, the overlap between the two languages is pretty significant, and to a certain degree the conversion is just a matter of syntax.

This isn't a new problem, and some people have tried to tackle it. A quick google search for "tsql to mysql" yields some promising results, notably this project here, which attempts to convert stored procedures from TSQL to MySQL:

http://sourceforge.net/projects/tsql2mysql/

This probably won't solve your problem completely, but it's at least a start.

like image 182
tylerl Avatar answered Sep 19 '22 04:09

tylerl


This website converts to/from many sql database versions: http://www.sqlines.com/online

TSQL, MySql, Oracle, DB2, Sybase, Informix, Hive, MariaDB, PostgreSQL, RedShift, TeraData, Greenplum, Netezza

like image 5
D. Kermott Avatar answered Sep 20 '22 04:09

D. Kermott