About 1,140,000 results
Open links in new tab
  1. CREATE FUNCTION (Transact-SQL) - SQL Server | Microsoft Learn

    Sep 3, 2024 · Applies to: SQL Server Azure SQL Database Azure SQL Managed Instance. Creates a user-defined function (UDF), which is a Transact-SQL or common language runtime (CLR) routine. A user-defined function accepts parameters, performs an action such as a complex calculation, and returns the result of that action as a value.

  2. SQL Server User Defined Function Example - MSSQLTips.com

    Nov 1, 2019 · SQL Server offers three types of user defined functions (udf) and in this tip we will cover examples for each of the three major types of user-defined function types: scalar-valued, table-valued and multi-statement table-valued.

  3. Create User-defined Functions (Database Engine) - SQL Server

    Sep 29, 2024 · This article describes how to create a user-defined function (UDF) in SQL Server by using Transact-SQL. User-defined functions can't be used to perform actions that modify the database state. User-defined functions can't contain an OUTPUT INTO clause that has a table as its target. User-defined functions can't return multiple result sets.

  4. SQL Server Functions - W3Schools

    SQL Server has many built-in functions. This reference contains string, numeric, date, conversion, and some advanced functions in SQL Server. Returns the string from the first argument after the characters specified in the second argument are translated into the characters specified in …

  5. SQL Server Functions: Create, Alter, Call - TutorialsTeacher.com

    SQL Server Functions are of two types: System Functions: These are built-in functions available in every database. Some common types are Aggregate functions, Analytic functions, Ranking functions, Rowset functions, Scalar functions.

  6. SQL Server Scalar Functions By Practical Examples

    Summary: in this tutorial, you will learn about SQL Server scalar functions and how to use them to encapsulate formulas or business logic and reuse them in the queries. SQL Server scalar function takes one or more parameters and returns a single …

  7. SQL Server User-defined Functions - SQL Server Tutorial

    In this section, you will learn about SQL Server user-defined functions including scalar-valued functions which return a single value and table-valued function which return rows of data. The SQL Server user-defined functions help you simplify your development by encapsulating complex business logic and make them available for reuse in every query.

  8. SQL Server: Functions - TechOnTheNet

    Learn how to create and drop functions in SQL Server (Transact-SQL) with syntax and examples. What is a function in SQL Server? In SQL Server, a function is a stored program that you can pass parameters into and return a value. You can create your own functions in SQL Server (Transact-SQL). Let's take a closer look.

  9. T-SQL Create Function syntax and example - T-SQL Tutorial

    To create a function in SQL Server with T-SQL uses the following syntax: CREATE OR ALTER FUNCTION function_name(parameters) SQL_statements. RETURN return_value. The function_name is the name of the function in the above syntax. The input parameters are given in the round brackets. It also has the data types.

  10. SQL Server Functions

    Here, we will guide you and teach you everything about functions in sql server with examples. What is a Function in SQL Server? In SQL Server, a function is a pre-written code segment that performs a specific task and returns a value.

  11. Some results have been removed