MySQL in (store) function

Source: Internet
Author: User
Tags mysql in

(store) function:

function, also referred to as "storage function", is actually JS or php in the said function!

The only difference:

the function here must return a data (value);

definition form:

Precautions:

1, within the function, can have a variety of variables and the use of process control;

2, within the function, you can also have a variety of additions and deletions to change the statement;

3, within the function, There can be no select or other "return result set" Query class statement;

Example:

invocation form:

same as calling internal functions! For example:

Select Now (), 8+3 as F2, func1 (); here,now() is a system function; func1 () is a custom function.

Or, if you are in a programming statement:

Set @v1 = Now ();

Set @v2 = Func1 ();

To delete a function:

The name of the drop function function;

MySQL in (store) function

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.