I created a procedure in mysql, but I got some error.
CREATE PROCEDURE find_book(IN bal varchar(16))
BEGIN
IF (SELECT INSTR(bal, '<') != 0)
-- // I want to know if the value of 'bal' is '<' but error probably comes from here
-- // I also tried to use IF(bal == '<'), but it doesn't work either
SELECT title
FROM book
WHERE price < 50
END IF;
END;
How could I determine the value in a variable in procedure?
Thanks.