Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
I'm a bit puzzled here, because what you seems to look for is exactly what the update statement does.
Sql is a set oriented language, meaning that your actions are applied to a set of rows.
When you do an update, you say what column should be updated to which vale, and then you filter the rows you want with a "where" clause.
Given your question, I assume that our table is
Code:
row | row2 | key
-----+--------+----
w.a + w.b + w.e
-----+--------+----
w.c + w.d + w.e
Though It's a bit strange to me...
Don't forget that a row is composed by an series of columns.
So, naming your columns row1, row2 and such is mostly disorienting.
Now, about your example, you would write it:
Code:
update table
set row='w.e', row2='w.e'
where key='w.e'
To update the column "row1" and "row2" of every rows (lines) whose key column value is "w.e"
__________________
Only a biker knows why a dog sticks his head out the window.
|