Calling User-Defined Functions

You can use a user-defined function, subject to permissions, any place you 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;

fullname (Employees.GivenName,Employees.SurName)

Fran Whitney

Matthew Cobb

Philip Chin

...

The following statement returns a full name from a supplied first and last name:

SELECT fullname ('Jane', 'Smith');

fullname ('Jane','Smith')

Jane Smith

Any user who has been granted Execute permissions for the function can use the fullname function.

Related concepts
User-Defined Function Restrictions
Maintenance of User-Defined Functions
Compiling and Linking Source Code to Build Dynamically Linkable Libraries
SQL Data Types
Related tasks
Creating a User-Defined Function
Setting the Dynamic Library Interface
Dropping User-Defined Functions
Granting and Revoking Permissions
Using Microsoft Visual Studio Debugger for User-Defined Functions