Mysql method of dynamically generating tables: Use sql statements to implement, the code is [create table ${name} (id varchar(36) primary key], [$] represents the table, and name means passed in through map Parameters.
##Mysql method of dynamically generating tables:
This project is an express project, because express delivery every day There are a lot of express delivery, so if all the data is stored in one table, the table will become bloated over time. Therefore, tables need to be created dynamically. How to write sql statements:<select id = "creatTable"> create table ${name}(id varchar(36) primary key , temp1 varchar(10) , temp2 varchar(10)) </select>
Related free learning recommendations:mysql database (video )
The above is the detailed content of How to dynamically generate tables in mysql. For more information, please follow other related articles on the PHP Chinese website!