What's wrong with this MySQL Stored Function?

Posted by Matt on Stack Overflow See other posts from Stack Overflow or by Matt
Published on 2010-02-17T14:00:13Z Indexed on 2010/04/27 0:03 UTC
Read the original article Hit count: 479

Having trouble getting this to apply in MySQL Workbench 5.2.15

DELIMITER //

CREATE 
    DEFINER=`potts`@`%` 
    FUNCTION 
        `potts`.`fn_create_category_test`  (test_arg VARCHAR(50))
    RETURNS int

BEGIN

    DECLARE new_id int;
    SET new_id = 8;
    RETURN new_id;

END//

The actual function will have a lot more between BEGIN and END but as it stands, even this 3 liner won't work.

Thanks!

© Stack Overflow or respective owner

Related posts about mysql

Related posts about mysql-workbench