Mysql Store Procedure basic syntax is :
Delimiter $$
CREATE PROCEDURE test()
BEGIN
//the program (body)
END$$
DELIMITER ;
Why you must use delimiter? because int the body of SP use a ; (semicolon) for running some query.
next, weakness of mysql store procedure :
- You cannot union a temporary table.
- If you have an parameters, the length of actual paramters must be same in a store procedure paramters.
- Your alias field in store procedure, must be different. Because it can be errors in a .net programme.
- You cannot insert the return of store procedure in some table, like in a Ms SQL (insert into <
> exec <
>. oke, that's my review...... Correct me if i wrong....
No comments:
Post a Comment