Home  >  Article  >  Database  >  What does into mean in mysql

What does into mean in mysql

WBOY
WBOYOriginal
2021-12-21 17:48:568045browse

Into in mysql means "convert into". The into keyword is generally used with the select statement to assign the retrieved value to a variable, that is, the data value is converted into a variable value, so that the variable represents It is the query result, and the syntax is "Select*Into data value from variable value".

What does into mean in mysql

The operating environment of this tutorial: windows10 system, mysql8.0.22 version, Dell G3 computer.

What does into mean in mysql

In mysql, into is generally used with the select statement

to retrieve the retrieved value Assign a value to a variable so that the variable represents the query result.

The syntax is as follows:

Select * Into new_table_name from old_table_name;

The example is as follows:

SELECT `name` INTO @name FROM student WHERE `id`=14 ;
SELECT @name

The execution results are as follows:

What does into mean in mysql

Recommended learning: mysql video tutorial

The above is the detailed content of What does into mean in mysql. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn