With most functions, including replace(), if any of the arguments are null,
it returns null.
On Mon, Jun 10, 2019 at 4:29 PM Tony Papadimitriou wrote:
> Example:
>
> --- CUT ---
> create table t(s text);
> insert into t values ('1'),('null'),('3');
>
> .print 'BEFORE'
> select rowid,* from t;
>
Example:
--- CUT ---
create table t(s text);
insert into t values ('1'),('null'),('3');
.print 'BEFORE'
select rowid,* from t;
update t set s = replace(s,'null',null)
--where s = 'null' --adding this works of course but that’s not my point
;
.print 'AFTER'
select rowid,* from t;
--- CUT ---
Th
2 matches
Mail list logo