mysql - SQL to delete tables that begins with common prefix
问题描述
I am looking to write a SQL query/stored procedure which would delete tables within a DB that begin with a common prefix like "table".
However the names of the tables begin with the prefix following by a number and I do not want to delete them all, if I could append the table numbers to the prefix.
Thanks
解决方案
look at this: Get table names using SELECT statement in MySQL
you could join that table with constraints on the table prefix
hope that helps and have fun
推荐阅读
- php - 在 curl 中发布后如何获得结果
- django - 尽管继承了通用视图和 CSRF 中间件,但 Django CSRF 令牌未验证
- sas - 使用连接数据集之一填充缺失数据
- python-3.x - 如何在 Graphviz 中格式化边缘标签?
- r - 计算名称几乎相同的列对的差异(最后一个字符串不同)
- php - Laravel 8 Passport 注册:未执行 UserController 操作
- arrays - 如何在 Rust 中循环整数向量?
- python - AllenNLP DatasetReader:只加载单个实例,而不是遍历训练数据集中的所有实例
- performance - 第二次计算的 TensorFlow 性能下降
- javafx - (JavaFX)麻烦分组 3D 对象并围绕一组轴旋转它们