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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -