Returning a signle result set
hi,
I have just begun writing some stored procedures in MySQL which are executed from Java. I have a problem that it appears that the result set for all executed SELECT statements are returned to where I only want the result set for the last executed SELECT statement returned. For example:
CREATE PROCEDURE ......
BEGIN
DECLARE flag INTEGER;
SELECT isOpen INTO flag WHERE recordType = 'file';
IF flag IS NULL THEN
SELECT FALSE AS result;
ELSE
SELECT TRUE AS result;
END IF
END
When I read the result from the procedure I get the result set containing the column 'isOpen', what I want is the result set contianing the column 'result'. Is there anyway to do this?
Thanks in advance
Stephen
Subject
Views
Written By
Posted
Returning a signle result set
2196
December 15, 2005 05:01AM
1361
December 15, 2005 05:41AM
1448
December 15, 2005 05:51AM
1446
December 15, 2005 06:42AM
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.