Is the following valid syntax to create a function that returns the number of records in the Country table? If not, why?
CREATE FUNCTION countryCount (J BEGIN
DECLARE count INT;
SELECT @count := COUNT(*) FROM Country;
RETURN count; END
A.
Yes.
B.
No, the SELECT syntax is incorrect; the count variable cannot be assigned in this way.
C.
No, the function must be defined as either DETERMINISTIC or NOT DETERMINISTIC.
D.
No, the variable type returned by the function must be defined with a RETURNS clause.
Explanation:
Routine Functions must provide a RETURNS clause noting data-type just after func_name and parameters, before characteristics.