469,613 Members | 1,952 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,613 developers. It's quick & easy.

How to get a rowset from a stored procedure in MySQL 5.0?

Hi everybody!

I have to evaluate MySQL 5.0 for a new DB-project.

Does anyone has a idea how to get a Rowset from a stored procedure on a
MySQL-server 5.0

I have tried

CREATE PROCEDURE `get_data`()
SQL SECURITY INVOKER
COMMENT 'my first sp'
BEGIN
Select * from data1;
END

But when i execute the procedur i always get an error:
SELECT in a stored procedure must have INTO

The procedure above will work fine on Microsofts SQLServer 2000 - but how in
MySQL

I have researched the internet but found nothing.

Thank you for any comment.
Jul 20 '05 #1
1 2623
Konrad Karall wrote:
CREATE PROCEDURE `get_data`()
SQL SECURITY INVOKER
COMMENT 'my first sp'
BEGIN
Select * from data1;
END


I'm still running MySQL 4.0, so I haven't done any MySQL procedures.
The feature is still very new (5.0 is in alpha), and the documentation
is pretty sparse.

But there are some good user comments with contributed examples
(including returning a result set) on the following web page:

http://dev.mysql.com/doc/mysql/en/St...rocedures.html

Regards,
Bill K.
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by eholz1 | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.