Another way is to remember that NULL is a distinguished thing that is
absence of a value, not any value of any type, and this applies to all
types:
- the integer 0 is a value, not null
- the date 1/1/1900 (or 1904 or ) is a value, not null
- the time 00:00:00 is a value, not null
- and the str
Tom Lane wrote:
"Gustav Lindenberg" <[EMAIL PROTECTED]> writes:
Why is '' not considered null is postgres (8.1.3)
Because they're different. The SQL spec says that an empty string
is different from NULL, and so does every database in the world except
Oracle. Oracle, however, does not define
"Gustav Lindenberg" <[EMAIL PROTECTED]> writes:
> Why is '' not considered null is postgres (8.1.3)
Because they're different. The SQL spec says that an empty string
is different from NULL, and so does every database in the world except
Oracle. Oracle, however, does not define the standard.
"Gustav Lindenberg" <[EMAIL PROTECTED]> writes:
> select * from security.users where length(us_username)=0;
> Surely this a null.
Surely not.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
---(end of broadcast)---
TIP 5
Hi
Why is '' not considered null is postgres (8.1.3) Currently I have to
use the following workaround where I have zero length strings in char
fields.
select * from security.users where length(us_username)=0;
Surely this a null. Apparently not in Postgres.
Currently I have to use the followin