mysql - Delete between tables -
is possible delete between tables?
something like...
delete bd between table1 , table 10 vehicle 761 delete bd.table_1 id_vehicle=761 delete bd.table_10 id_vehicle=761
you can either write stored procedure (look @ mysql dynamic query in stored procedure) or change table structure either vehicle ids related via foreign key constraint (then can cascading deletes, see http://www.mysqltutorial.org/mysql-on-delete-cascade), or use 1 big table store everything, partition date, if content reaches size, makes sense.
Comments
Post a Comment