Dear All - can anyone see what the syntax error is in the following stored procedure error?
Thanks
SQL query:
DELIMITER $$ CREATE PROCEDURE select_categories( TYPE VARCHAR( 6 ) ) BEGIN IF TYPE = 'coffee' THEN SELECT * FROM general_coffees ORDER BY category;
MySQL said:
#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 'DELIMITER $$ CREATE PROCEDURE select_categories (type VARCHAR(6)) BEGIN IF ty' at line 1