views:

48

answers:

2

Hello everyone,

I am a developer previously working on SQL Server and Windows platform. I am learning MySQL on Windows platform. I have two basic questions which does not find definite answer yet,

  1. Does MySQL support T-SQL to write store procedure? If not, are there similar technologies to T-SQL in MySQL world (I am referring to stable/mature technologies);
  2. If I download lastest MySQL version (version 5.1), does it support transaction or not (I heard MySQL does not support transaction before)?

thanks in advance, George

+2  A: 

1) Yes, in the latest version there is full support for Stored Procedure.

2) Yes, it is supported.

feal87
Store procedure is not the same as T-SQL. I am not sure whether writing store procedure using T-SQL is much powerful than writing store procedure on MySQL?
George2
Yes, the stored procedure can be written in T-SQL. (http://dev.mysql.com/tech-resources/articles/mysql-storedprocedures.html)
feal87
+5  A: 
  1. T-SQL: It doesn't have a specific name, but yes, it supports stored procedures and functions (Manual Chapter 19)
  2. Transactions: Yes, MySQL supports them in some of its storage engines (InnoDB, for instance). Some storage engines don't support them (MyISAM, for instance), but you can just not use those.

When working with MySQL, I always have a bookmark available for directly accessing the (in my opinion) very good Reference Manual.

Cassy
I am not sure whether writing store procedure using T-SQL is much powerful/comprehensive than writing store procedure on MySQL? Or almost the same difficulty to implement the same feature using store procedure?
George2
Thanks, question answered!
George2
T-SQL is only the name of a dialect of SQL supported by SQL Server, it is not in itself anything to do with stored procedures. MySQL does not speak T-SQL. MySQL stored procedures are based on the ANSI SQL/PSM standard. There are syntax differences between SQL/PSM and T-SQL's implementation of stored procedures.
bobince