• Welcome, Guest. Please login.
September 19, 2020, 02:44:08 am


Welcome to the SQLitening support forums!

Update two fields on same record with one statement?

Started by Bern Ertl, January 16, 2009, 04:35:08 pm

Previous topic - Next topic

Bern Ertl

January 16, 2009, 04:35:08 pm Last Edit: January 16, 2009, 04:47:16 pm by Bern Ertl
I'd like to update two fields of the same record with one statement.  Right now, I'm using two SQL statements:

UPDATE table SET field1 = 'value1' WHERE RowID = 1

UPDATE table SET field2 = 'value2' WHERE RowID = 1

I'm guessing there is a better way to do this with just one SQL statement, right?

Fred Meier