Skip to content
Advertisement

Change the value of a field in multiple tables

I need to clean up data in two tables. These are my tables:

Table 1

Table 2

I would like to update the ids of id (first table) and parent_id (second table) increasingly. So I would like to transform the two tables like this:

Table 1

Table 2

It’s possible? What should i use?

Advertisement

Answer

MySQL lets up update multiple tables at the same time. So, you can do:

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement