"Lloyd" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Lets assume a table having following data > > No. Name Address > ======================== > 1 A addrA > 2 B addrB > 3 C addrC > 4 B addrB1 > > I want to update the filed 'Address' based on field 'Name'. But if > there are multiple table entries (The case of B), I just want to > update the last entry in the table. How can I write a query for this?
update mytab set Address='addr' where No = ( select No from mytab where name='B' order by No desc limit 1 ); Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users