Re: Delete from all tables
No wildcard DELETE in SQL.
It's relatively easy in an app language like PHP or C# to write a loop that executes a DELETE for a list of tables.
It's less easy but possible to do the same in a MySQL sproc using PREPARE.
But having to do a mass deletion across many tables to delete a particular value is a surefire indicator of incorrect database design. Your database is seriously redundant. Read about normalisation.
Subject
Written By
Posted
Re: Delete from all tables
January 18, 2014 04:22PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.