473,385 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 2752
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Rich R | last post by:
First, let me introduce myself to the group. My name is Rich and I've been doing databases for about 25 years with the last 10 being pretty much MS SQL Server. I've become intrigued with MySQL and...
2
by: gigi | last post by:
I have a strange problem with an OleDB call to a stored procedure that returns a rowset. Only the first time I execute the query, after I restart SqlServer, my program crashes because the rowset...
0
by: edward zhang | last post by:
I have a VB.Net application which uses the Crystal Report(Crystal Report 8.5) Viewer to open reports. One of the reports uses a stored procedure and another one uses tables as data resource, both...
1
by: E.T. Grey | last post by:
I have been busting my nut over this for pretty much most of the day and it is driving me nuts. I posted this to an mySQL ng yesterday and I have not had any response (I'm pulling my hair out...
0
by: IamtheEvster | last post by:
Hi All, I am currently using PHP 5 and MySQL 5, both on Fedora Core 5. I am unable to call a MySQL stored procedure that returns output parameters using mysql, mysqli, or PDO. I'm having a...
2
by: bshumsky06 | last post by:
Hi, I am trying to create stored procedures in MySQL. Does anyone have a suggestion on a good IDE to use. I have been working with the MySQL Query Browser but it generates errors very often and...
7
by: eholz1 | last post by:
Hello PHP group, Could someone help me out? I have PHP 5.2, Apache 2.0, and MySQL 5.0 running on Linux (Redhat Fedora Core 6). All that works fine. I would like to be able to "call" a stored...
2
by: zombiemasta | last post by:
Hi, I've wrote a stored procedure which expects a parameter to be passed in on the WHERE clause for channelID. The stored procedure runs fine in Navicat for MySQL when you specify the parameter...
0
by: Geethu03 | last post by:
Hi I had a doubt in Mysql Stored procedure. i need to read a text file (that is stored in mysql database) using the Stored procedure. i know little bit about the Stored procedure but i am not...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.