且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将mysql存储过程转换为sql server存储过程

更新时间:2022-11-25 15:27:01

你不能转换它。如果可能的话,重写它。

请注意,RDBM系统的这个功能绝对专有,没有它们符合的标准。所以MySQL和SQL Server支持完全不同的存储过程。这更加正确,因为MySQL是多平台的,而SQL Server只是Windows。但在大多数情况下,MySQL到SQL Server端口比反方向更可行。

如果你不熟悉t-sql,***从一些教程开始:

http://sqlmag.com/t-sql/t-sql-101-stored-procedures [ ^ ]

http://www.mssqltips.com/sqlservertutorial/160 / sql-server-stored-procedure / [ ^ ]

...
You can not "convert it". Rewrite it, if it is possible at all.
Please note, that this feature of the RDBM systems absolutely proprietary, there is no standard they conform. So MySQL and SQL Server support totally different stored procedures. And that is even more true because MySQL is multi-platform, while SQL Server is Windows-only. But in most cases the MySQL to SQL Server port is much viable than in the opposite direction.
If you are new to t-sql, you better start with some tutorials:
http://sqlmag.com/t-sql/t-sql-101-stored-procedures[^]
http://www.mssqltips.com/sqlservertutorial/160/sql-server-stored-procedure/[^]
...