> create table t(s varchar(5)); Also note that SQLite doesn't 'understand' varchar (it uses text) and it doesn't limit the entry to 5 characters. This doesn't help your issue directly, but does highlight that you've not read the SQLite documentation, and aren't creating tables properly.
On Fri, Apr 12, 2019 at 5:06 PM Shawn Wagner <shawnw.mob...@gmail.com> wrote: > From the documentation (https://www.sqlite.org/lang_update.html) > > If a single column-name appears more than once in the list of assignment > expressions, all but the rightmost occurrence is ignored. > > > On Fri, Apr 12, 2019, 9:00 AM Tony Papadimitriou <to...@acm.org> wrote: > > > create table t(s varchar(5)); > > > > insert into t values('US'),('USA'); > > > > update t set s = replace(s, 'USA', '___'), > > s = replace(s,'US','USA'), > > s = replace(s,'___','USA'); > > > > select * from t; > > > > -- Expected answer: > > -- USA > > -- USA > > -------------------------------------------------- > > -- MySQL gets it right > > -- Postgres prints error about setting the same column multiple times > > -- SQLite3 (latest and older) no changes or wrong result but no > > error/warning > > _______________________________________________ > > sqlite-users mailing list > > sqlite-users@mailinglists.sqlite.org > > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users