SQL Server series: Custom functions

Source: Internet
Author: User
Tags scalar

A user-defined function can be called as a system function in a query or stored procedure, can accept parameters, perform operations, and return the result of the operation as a value. The return value can be a single scalar or result set.

1. Scalar functions

Scalar functions return a scalar value that determines the type, for scalar functions of multiple statements, the function body defined in the begin End block contains a series of T-SQL statements that return a single value.

2. Table-Valued functions

A table-valued function is a function that returns a data type table, and the returned table value is the result of a single SELECT statement query.

SQL Server series: Custom functions

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.