On 2011-02-23 20:22, Felipe Aron wrote:
Quote:
I Need to call one procedure inside other procedure:
MainProcedure
begin
...
call AnotherProcedure();
end
Try this method but MySQL dont accept. And Now? |
You will have to be a bit more specific on what error you encounter. In
general it is no problem calling one procedure from another:
mysql> delimiter @
mysql> create procedure a(in x int, out y int)
-> begin
-> SET y = x + 1;
-> end;
-> @
Query OK, 0 rows affected (0.03 sec)
mysql> create procedure b(in u int, out v int)
-> begin
-> call a(u, v);
-> end;
-> @
Query OK, 0 rows affected (0.00 sec)
mysql> delimiter ;
mysql> call b(10, @result);
Query OK, 0 rows affected (0.00 sec)
mysql> select @result;
+---------+
Quote:
@result |
+---------+
11 |
+---------+
|
1 row in set (0.00 sec)
/Lennart