User defined functions in SQL allow users to save reusable SQL code. Functions can accept parameters and return single values or result sets. They are more limited than stored procedures. Functions are categorized as scalar or table valued depending on whether they return single values or tables. Users create functions using the CREATE FUNCTION statement, which specifies the function name, parameters, return type, and SQL code in the function body.