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

Reply via email to