2012-09-11

MySQL Stored Procedure


Use this tool, Sqlyog Ultimate, to design MySQL stored-procedure is quiet familiar with MSSQL management tool. I start over to like MySQL. It's more interesting now.

2 more things,

at first, after creating a record successfully, I should return and check result to the front-end, like this:

ROW_COUNT() -- check only one record affected, and then return
LAST_INSERT_ID() -- return a new index added from the table

http://stackoverflow.com/questions/2229218/what-is-mysql-version-of-rowcount

http://stackoverflow.com/questions/2209340/mysql-identity-vs-sql-server-last-insert-id

No comments:

Post a Comment