简体   繁体   中英

Storing MySQL queries in the database (MySQL)

How would I store MySQL queries in a table within the MySQL database that they would be executed?

I was thinking of using something like this:

id int // unique ID of the query
statement varchar(1000) // actual query
var_list varchar(255) // comma separated list of variables to be used in the query

Is there anything else I should use, (or omit) for example the var_list - should the variables be hardcoded in the statement itself?

没有理由在数据库中存储SQL查询。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM