table has 2 fields (field1, field2). How I can set field1= field2 . Regular update doesn't do the job
update table my_table set field1 = field2 where field2 is NULL;
Thanks
The query you've given would basically set field1 to NULL for every row where field2 is NULL. Is that what you want?
I want to set field1 = field2 where field2 < 1;
Oh, you also have an error in your SQL syntax. You don't need to say "UPDATE TABLE my_table", just "UPDATE my_table". Here's the query you should use...
UPDATE my_table SET field1 = field2 WHERE field2 < 1