First off I apologize for being a newbie to MySQL but one must learn somewhere...
I am attempting to create a stored procedure that take input (primary key) and finds a field for that record and output to a variable...
my code so far:
CREATE PROCEDURE sp_dealer_name( IN dealerID CHAR, OUT dealername VARCHAR(45) ) BEGIN SELECT DealName INTO dealername FROM dealer WHERE DealNum = dealerID; END;
However I keep getting:
Error Number 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 9
I cant seem to figure out where I am going wrong
I am using MySQL Client Version 5.1.11 and
MySQL Server Version 5.1.41-community via TCP/IP
Any help would greatly be appreciated