Andreas Joseph Krogh wrote:
This has been been discussed before, but Oracle behaves differently, and IMHO in a more correct way.

The following query returns NULL in PG:
SELECT NULL || 'fisk';

But in Oracle, it returns 'fisk':

The latter seems more logical...

When in doubt, consult the standard ... Oracle's treatment of NULL is known to violate the standard, IIRC. Your measure of correctness seems to be "appears to me more logical", but ours is "complies with the standard".

In any case, why should null have a string value of '' any more than it should have a value of 'blurfl'?

Your analogy elsewhere with aggregate functions like sum() is not relevant, as these are documented to ignore null values.



---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?


Reply via email to