For example, I have four tables now. The columns of each table are different, but they all have an ID column. In some tables, the ID is not used as the primary key. I now need to set the ID value in the four tables based on the ID value. If all the data in row 12 is deleted, how should I write the DELETE statement? Please give me some advice
For your problem, just execute four SQL statements.
You cannot guarantee that every table has the records you want to delete. There may be problems no matter how you join