So, I have to write a sql script to update 2 values on the same columns with a different ID from an ITEM table. Here is what I write:
UPDATE ITEM
SET ArtistName = 'Rex Baker'
WHERE ItemNumber = 2
AND ItemNumber = 4;
However, it does not work at all. Can anyone tell me what I did wrong ? and how can I fix it ? Thank you
itemmust have anItemNumberof2 AND 4... rather than2 OR 4.WHERE (ItemNumber = 2 AND ItemNumber = 4)is an equivalent of your version. So, your item number will never have 2 different values on the same row, and thus nothing will happen in your script. I hope this shed some light on the question.