So I have this stored function added in mysql workbench:
CREATE FUNCTION `getfullAdd` (id INT unsigned)
RETURNS VARCHAR(160)
CHARACTER SET utf8
COMMENT 'function that returns all addresses with character string when you enter customer number'
DETERMINISTIC
READS SQL DATA
BEGIN
DECLARE addfound VARCHAR(160) CHARACTER SET utf8;
SELECT CONCAT_WS(', ', addr01, addr02) INTO addfound FROM dtb_customer WHERE customer_id=id;
RETURN addfound;
END
I'm bit new to this DETERMINISTIC
keyword.
What does it do to the function above?
If set by this keyword, does function return the same value by the same parameter?
If customer's address is changed, does this function returns different result from the same parameter?