Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 Postgres 中将空字符串与整数进行比较?
例如:Select * From xyz where anynumber = ''
A numeric column can't be "blank", but it can be null. I think that's what you want:
null
Given that anynumber is nullable, ie
anynumber
create table xyz ( ... anynumber int, -- ie not "NOT NULL" ... )
You can test for null:
select * From xyz where anynumber is null