You retrieve data from a function by using a SELECT statement. Functions can be used in:
CHECK or DEFAULT constraint
FROM clause with the CROSS/OUTER APPLY function
How a function is used can have a dramatic impact on the performance of the queries that you execute.
A function in the SELECT list is used to calculate an aggregate or perform a computation on one or more columns from the tables in the FROM clause.
A function in the WHERE clause is used to restrict a result set based on the results of the function. You should not create queries that utilize a function in the WHERE clause, because the function has to be executed once for each row in the result set in order to determine if ...