What is the outcome when you try to create the function?

Consider the CREATE FUNCTION statement:
CREATE FUNCTION countrycount ()
BEGIN
DECLARE count INT;
SELECT COUNT (*) INTO count FROM country;
RETURN count ;
END
What is the outcome when you try to create the function?

Consider the CREATE FUNCTION statement:
CREATE FUNCTION countrycount ()
BEGIN
DECLARE count INT;
SELECT COUNT (*) INTO count FROM country;
RETURN count ;
END
What is the outcome when you try to create the function?

A.
An error results as the SELECT must assign the return values to a user variable.

B.
An error results as the count variable is not initialized with a value.

C.
An error result as the function must be defined with the CONTAINS SQL clause.

D.
An error result as 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.



Leave a Reply 5

Your email address will not be published. Required fields are marked *


John

John

I think its F

John

John

ya its definitely not not F