Hi all, i have a problem in writing a block of SQL code in mysql. The block of code will have too delete a single row/record from about 23 related tables all at once.

The code that i have written so far will only delete 1 row/record in 10 related tables but no more. Will not mysql allow this? Can anyone help me?

Thanks to anyone that can help me out.

Recommended Answers

All 2 Replies

If your tables are linked through PK / FK, you need to delete from clild table record first and move upwards to parent table records and delete.

If your tables are linked through PK / FK, you need to delete from clild table record first and move upwards to parent table records and delete.

Thanks debasisdas, but i still get 0 row(s) deleted. ( Query took 0.0256 sec )

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.