Angus Angus - 2 months ago 4x
Python Question

Insert statement at row where MyCol is x

I have 2 columns MyCol and NewCol. MyCol has already been populated, and may have duplicates (it's not the primary key). I need to insert a value y into NewCol at all rows where MyCol = x. I'm stuck here and not sure how to implement this.


This is just an update statement

SET NewCol = Y
WHERE MyCol = x

Why exactly could you not find this in ANY introduction to SQL - book, article, reference, team-mate etc?