Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
3. Invoke the get_pi() function
Summary

Instruction

Now that we know what the source code of the get_pi() function looks like, let's invoke the get_pi() function and review the returned results.

To invoke a user-defined function in SQL, you can use a SELECT statement:

SELECT get_pi();

You may review the function body in the Database tab on the right-hand side. Note that we defined the function return type as decimal, and you may see that the get_pi() function returns a numeric type.
How is that possible? Because those types are equivalent – you may use them interchangeably.

Exercise

Run the template query to invoke the get_pi() function, and review the result returned.