Skip to content
Advertisement

After Search in SQL Update a column value in the found rows

I have a DB table where a Field can have several different values, I want to update a field with certain values please see table below

I would like to change the Name1 fields containing Key with Keys2. My actual table has more than 100 rows so I don’t want to just look for the ID and then replace it.

The search part is not a problem I can do that as follows:

So this would find the rows with ID 1 and 4. The I would like to update these found rows so the table now looks like

I would not know where to start to update all of found rows. any help is welcome

Advertisement

Answer

So, you use update:

Is there something that I’m missing in your question?

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