Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- MySQL function error
November 8, 2007, 7:47 am
rate this thread
I have a table called "distributor" having "distributor_id" as a PK
and taking an integer data type as well as "distributor_parent_id"
which also takes an integer data type but can accept null values;
I tried to make this simple function that returns the parent_id by
taking a parameter representing the distributor id; still it fails, I
assume due to the delimiters.
I appreciate any assistance to this regard.
CREATE FUNCTION last_inserted_parent_id ( inserted_id INT )
DECLARE parent_id INT$$
SET parent_id = (
WHERE distributor_id = inserted_id
- C. (http://symcbean.blogspot.com/)
November 8, 2007, 1:20 pm