create table test(name varchar(32)); pg2=# insert into test values(''); INSERT 0 1 pg2=# insert into test values(' '); INSERT 0 1 pg2=# insert into test values(null); INSERT 0 1 pg2=# select * from test; name ------ (3 rows) pg2=# select * from test where name is null; name ------ (1 row) pg2=# select * from test where name=''; name ------ (1 row) pg2=# select * from test where name=' '; name ------ (1 row) 原文链接:https://www.f2er.com/postgresql/194565.html