In Oracle, why is '' = '' false?

oracle, oracle11g, sql

Solution

In Oracle, an empty string equates to NULL. You don't use `=` for NULL values.

Problem

This question comes from my previous post. I'm curious as to why: ``` select * from TPM_USER where '' = '' ``` Returns zero rows, however: ``` select * from TPM_USER where 1 = 1 ``` Returns every row in the table. Is this per SQL standard, or is this Oracle specific? Oracle SQL Fiddle. The following work as expected: PostgreSQL SQL Fiddle SQL Server SQL Fiddle mySQL SQL Fiddle

Original source

Related problems