PostgreSQL/Oracle full-width space replacement

Record the trim method of SQL, and the full-width spaces operate in two databases at the same time.

The original SQL
select * trim (chr('') from field name) as field name from table name;

New SQL
select * trim (chr (33088) from field name) as field name from table name;

例子:
create table user(
id varchar(8) not null,
name varchar(10),
constraint user primary key (id)
);

select * trim(chr(33088) from name) as name from user;

Guess you like

Origin blog.csdn.net/qq_41520636/article/details/109994548