If I have a Stored Procedure like this…
DELIMITER $$
CREATE PROCEDURE select_customer(type VARCHAR(10))
BEGIN
IF cust_type = 'premium' THEN
SELECT *
FROM customers
WHERE type = 'premium';
ELSE
SELECT *
FROM customers;
END IF;
END$$
DELIMITER;
Shouldn’t I be able to test the Stored Procedure with a call like this??
CALL select_customer('premium');
I tried that with an example in my book and it gave me an error.
TomTees