revert rows to default column value mysql

Viewed 8449

I am using MySQL community server 5.1. Is there a way to just set all the rows back to their default column values with one query?

I just added a lot of rows. I had default values for most of the columns specified, but for some reason all the columns values were set = 0 instead. I was wondering if there is a query to set all the column values to their default value, and I would need the ability for a where clause too.

something like this for example:

update table set values = values(default) where id > 300;

Thanks!

2 Answers
Related