Steps to follow:
- Replace {db_name} by the real project's database name.
- Execute the sentence.
- Copy the generated string (TRUNCATE list, one for each table).
- Execute the string copied in the previous step (TRUNCATE list).
| SELECT | |
| CONCAT('TRUNCATE TABLE ', TABLE_SCHEMA, '.', TABLE_NAME, ';') AS table_name | |
| FROM information_schema.TABLES | |
| WHERE TABLE_SCHEMA = '{db_name}' | |
| AND TABLE_NAME LIKE 'cache_%' | |
| AND TABLE_TYPE = 'BASE TABLE' |