A user-defined function can be used, subject to permissions, in any place you would use a built-in nonaggregate function.
This Interactive SQL statement returns a full name from two columns containing a first and last name:
SELECT fullname (GivenName, LastName) FROM Employees;
The following statement returns a full name from a supplied first and last name:
SELECT fullname ('Jane', 'Smith');
Any user who has been granted Execute permissions for the function can use the fullname function.