In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Stored procedures for MYSQL
A stored procedure is a precompiled collection of SQL statements and control statements, stored in a name and processed as a unit
2 advantages of stored procedures
Enhance the function and flexibility of SQL statements
Achieve faster execution speed
Reduce network traffic
3 points for attention
When creating a stored procedure or custom function, you need to modify the delimiter through the DELIMITER statement
If the function body or process body has more than one statement, it needs to be included in the begin.. end statement block.
Stored procedures are called through CALL
4 parameters
Input Typ
Output type
Input & output
5. Create CREATE.PROCEDURE.
6 IN, indicating that the value of this parameter must be specified when the stored procedure is called
7 OUT, indicating that the value of the parameter can be changed by the stored procedure and can return
8 INOUT, indicating that the parameter is specified when called, and can be changed and returned
9 the process body can be composed of legitimate SQL statements
10 the process body can be any SQL statement
11 if the procedure body is a compound structure, use the begin.. end statement.
12 composite structures can contain declarations, loops, and control structures
13 the difference between stored procedures and functions
The functions implemented by stored procedures are more complex, and the functions are more targeted.
Stored procedures can return multiple values, and functions can appear as part of other SQL statements
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.