Help Center > > User Guide> MySQL Database Management> Function Management> Creating a Function

Creating a Function

Updated at: Mar 20, 2020 GMT+08:00

Scenarios

Functions return the results of a specific action quickly. This section describes how to create a function.

To create functions, you need to obtain the CREATE ROUTINE permission. To alter and drop functions, you need the ALTER ROUTINE permission.

Prerequisites

You have logged in to the DAS console.

Procedure

  1. In the navigation tree on the left, right-click Functions under the target database and choose Create Function from the shortcut menu.
  2. In the displayed dialog box, specify the required parameters and click OK.
  3. On the displayed tab, enter the required SQL statements and click Save.
  4. Click Option, set the parameter as required on the displayed page, and then click OK.
  5. Click Execute to execute the function. You can view the execution status in the Message area.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel