I have a table that contains two columns, both have email values. I want to create a query that update a specific data in both columns.
For example if I have two records of the email '[email protected]'
in one column and three records of '[email protected]'
in the other column I want them both to be updated.
Here for example I want that all the '[email protected]'
will be '[email protected]'
:
My question is how the query should look like.
The simplest way is to run two update statements:
This begs of the question of why two columns are storing the same data. Perhaps you need to review your data structure and use a junction table for this information.