Quote:I can't find any way to change the last 'Foo' to 'Bar' (but then again I'm quite new to sql).
"Last foo", or a "specific foo"?
In general, you aren't guaranteed an order in which results are returned. While "SELECT *" will in general return results in same order, and in the order they were entered, there is no guarantee for that.
This is where indices come into play. You define primary and unique index. Can be auto-incremented, as long as it's unique. Then, when you need to update the elements, you refer to them by that index, not by values.
There is of course a way to do what you want, but I believe that you really absolutely shouldn't do that in order to acomplish what you want.
Best advice I'd give you: Define separate column 'ID', which is primary key and auto-incremental.
"SELECT ID, Name FROM Test;", and each result will be both, id and name.
Find out which of the results you want to change (let's say id=6)
"UPDATE Test SET Name='Bar' WHERE Id='6';"