Home >Database >Mysql Tutorial >What is the usage of with...as in mysql

What is the usage of with...as in mysql

PHPz
PHPzforward
2023-06-03 14:33:401308browse

Recently I accidentally came across an article, which wrote about the usage of SQL, which is with...as. I took the time to record it at noon

I tried it with MySQL and found that this syntax is not supported ( Version: 5.7)

What is the usage of with...as in mysql

What is the usage of with...as in mysql

So replace it with the following (version: 8.0) and no error will be reported:

What is the usage of with...as in mysql

What is the usage of with...as in mysql

What is the usage of with...as in mysql

To summarize the usage of with, it is similar to generating a temporary table, which is no different from the operation in the red box below

What is the usage of with...as in mysql

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

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete