Re: How can I declare a variable of type RECORD?
Posted by:
Bob Field
Date: May 21, 2006 12:00AM
Declare each field separately. Use names distinct from any actual column names. Subsitute appropriate declarations for data being fetched. Also in MySQL sprocs, declarations have to appear inside of a BEGIN..END block, prior to any other statements.
BEGIN
DECLARE vFirst varchar(20);
DECLARE vMiddle varchar(20);
DECLARE vLast varchar(20);
...
SELECT name_first, name_middle, name_last
INTO vFirst, vLast, vMiddle
FROM people
WHERE id=person_id;
...
END;
Subject
Views
Written By
Posted
14342
May 20, 2006 11:45PM
Re: How can I declare a variable of type RECORD?
10069
May 21, 2006 12:00AM
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.