Read about mysql select result into variable, The latest news, videos, and discussion topics about mysql select result into variable from alibabacloud.com
Add by Zhj: In the MySQL5.6 of some parameters have been increased, see http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.htmlOriginal: http://mageedu.blog.51cto.com/4265610/1062628Marco Education Linux operation and maintenance
Use SELECT ... Into statement assigns a value to a variableIn the MySQL stored procedure, you can use SELECT ... The INTO statement assigns a value to the variable, which is queried in the database and assigns the resulting result to the variable.
Server system Variables (System variable)The MySQL system variable (systems variables) refers to the various system variables of the MySQL instance, which are actually some system parameters that are used to initialize or set the database to occupy
In common: case-insensitive, both variables
Different points: Global variables are read-only in the system and can be modified in a configuration file
Terminology classification for MySQL variables:
1. User variable: Starting with "@" in the form
Tag: color is medium tar local str local SSI GlobalDescription: Now on the market defined variables of the tutorial and books are basically stored procedures are described, but the stored procedure variables can only be used in begin...end block,
Concrete Example 1. PHP Server ComponentsFor beginners, it is recommended to use the integrated server component, which already includes PHP, Apache, Mysql and other services, eliminating the time spent by developers in the tedious configuration
18.2.1 MySQL server has gone away errors related to Lost connection to server during query.
The most common cause of the MySQL server has gone away error is that the server times out and closes the connection. By default, if nothing happens, the
MySQL Format statement specificationHow do I log into your database?Example!If you are compiling the installation of the flowers, then you have to compile the installation of the directory to go, my is installed into the/usr/local/mysql database: Cd/
Use select... The into statement assigns a value to the variable.
In the MySQL stored procedure, you can use select... The into statement assigns a value to the variable, queries the variable in the database, and assigns the obtained result to the
MySQL stored procedure SP explanation
1. Introduction to stored procedures
The commonly used Operating Database Language SQL statements must be compiled and then executed before execution. the Stored Procedure (Stored Procedure) is a set of SQL
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.