So I got
SELECT
CONCAT(
"DROP TABLE ",
GROUP_CONCAT(TABLE_NAME)
) AS stmt
FROM information_schema.TABLES
WHERE TABLE_SCHEMA = "my_db" AND TABLE_NAME LIKE "__temp_%";
It generates a stmt like
DROP TABLE __temp_afsrpsy,__temp_dfsposb,__temp_exyrygx,__temp_gfyunsc,__temp_jhwshaj,__temp_khlmgnv,__temp_mhbhtfy,__temp_ondgdqr,__temp_oqucumc,__temp_prmgzax,__temp_qqhlwgi,__temp_vhrmdpu,__temp_xpqhrew,__temp_xraqrss,__temp_yvnplnu
This is OK as it is a two step process, one to generate the Drop statement and the other to copy and run this statement into the command line and run it; however is there a way to do this in one step in the command line or work_bench without using PHP?
Yes I’m curious and lazy
Regards,
Steve