I have a table Person with age as one of the columns having 1000 entries. I want to update age of each person my multiplying it by 2.
Would it be possible in one SQL query? I am using MySQL database.
Yes, this is possible like so:
UPDATE Persons p
SET p.Age = p.Age * 2;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With