In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you how to define parameters in MySql stored procedures. I hope you will gain something after reading this article. Let's discuss it together.
1. Parameter classification
Parameters, like stored procedures in MySql, can also take parameters. We do not use parameters in the previous example, but we will use parameters in the following example. Parameters of MySql are divided into three categories: IN, OUT, and INOUT, even literally these three types of parameters are easy to understand:
IN: this is the default type, that is, if the parameter does not specify a type, then the default is the IN type. This parameter is mainly the passed value, which is provided to the stored procedure. In addition, the changes made by the stored procedure will not affect the passed parameters.
OUT: this is mainly the value that the stored procedure passes out, that is, the stored procedure changes it to you and passes it back to the program that called it.
NOUT: the above two features are combined, that is, the value can be passed to the stored procedure, and the stored procedure can also change the value in passing to the program that calls it.
2. Parameter definition
The parameters are defined as follows:
MODE param_name param_type (param_size)
Where MODE can be IN, OUT, INOUT;param_name is the parameter name, and param_type is the type. Of course, it is important to note that the name cannot be the same as the field in the table.
After reading this article, I believe you have some understanding of "how to define parameters in MySql stored procedures". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.