SQL Server user-defined functions are created using the CREATE FUNCTION command . Any created function can take zero or more input parameters of any type except timestamp, cursor, or table. User-defined functions pass back a single value as defined in the RETURNS section of the CREATE FUNCTION. User-defined functions can return any data type except text, ntext, image, cursor, or timestamp.
All user-defined functions must comply with all naming standards set forth for all objects in the database. Unlike other objects in the database, when you call a user-defined function, you must use the qualified object name, in the format of owner_name . function_name , as follows :
SELECT * FROM dbo.fncReturnScalarValue
As with ...