0

Possible Duplicate:
How do I add to each row in MySQL?

This is probably really easy for most of you but I can't wrap my head around it. I have a column in my table that is of type Float. I want to modify the value of this column for each row by adding 15. For example, if the column's value for a particular row is 10, I want to add 15 to it to make the new value 25, and the same for each subsequent row.

I am attempting to use PHP to do this but is there a way to do this just straight SQL?

1

1 Answer 1

2
UPDATE `tableName` SET `fieldName` = `fieldName` + 15 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.