MySQL Forums
Forum List  »  Stored Procedures

Re: How to do this ?
Posted by: Roland Bouman
Date: November 25, 2005 01:16PM

Beat, I don't think thats true. convince yourself:

mysql> create procedure noblock()
-> begin
-> if true then
-> select 1;
-> select 2;
-> else
-> select 3;
-> select 4;
-> end if;
-> end;
-> //
Query OK, 0 rows affected (0.06 sec)

mysql> call noblock();
-> //
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.02 sec)

+---+
| 2 |
+---+
| 2 |
+---+
1 row in set (0.02 sec)

Query OK, 0 rows affected (0.02 sec)

It works for case too.

MS SQL Transact SQL does have this restriction I believe (at least for the WHILE construct)

Options: ReplyQuote


Subject
Views
Written By
Posted
2124
November 23, 2005 12:11PM
1543
November 24, 2005 08:01PM
1535
November 25, 2005 11:23AM
Re: How to do this ?
1508
November 25, 2005 01:16PM
1442
November 27, 2005 07:52AM
1487
November 27, 2005 08:57AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.