That sets the value of the col1 field in every row in tb1 to the value retrieved from tb2. I doubt that's what he wants, but he didn't tell us, so maybe it is.
RobR -----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Igor Tandetnik Sent: Thursday, August 23, 2012 9:12 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] to table update yanhong.ye <y...@sohu.com> wrote: > update tb1 set col1=(select col1 from tb2 ) where tb1.co2=tb2.co2; The closing parenthesis is in the wrong place: update tb1 set col1=(select col1 from tb2 where tb1.co2=tb2.co2); -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users