User defined functions
- Do not call functions repeatedly in stored procedures, triggers, functions and batches, instead call the function once and store the result in a variable, for later use.
- Unless absolutely necessary, DO NOT USE in-line user-defined functions in SELECTs. If unavoidable, discuss with a Senior Developer first before implementing it.
- When used it must be if possible only use data provided and not do extra selects from other tables.