mysql - Delete all records from each table having a specific column value -


  1. find every table in same database has field client_id
  2. delete records client_id = 123

above scenario. i'm wondering if it's possible using mysql single query.

you don't know names of tables client_id field, can found using informational schema , stored in temporary table. then, dynamic query should generated in loop delete required records. that.


Comments

Popular posts from this blog

gcc - MinGW's ld cannot perform PE operations on non PE output file -

How to connect android app to App engine -

hadoop - Running Map Reduce Job shows error - Mkdirs failed to create /var/folders/ -