How can i fix 'this function has none of deterministic, no sql, or reads sql data' in sql?
Example:
While defining a stored function:
CREATE FUNCTION exampleFunc(x INT) RETURNS INT
BEGIN
RETURN x + 1;
END;
SQL requires you to specify whether the function is deterministic or not, and how it interacts with data.
Solution:Add the required characteristics to the function definition.
CREATE FUNCTION exampleFunc(x INT) RETURNS INT
DETERMINISTIC READS SQL DATA
BEGIN
RETURN x + 1;
END;