db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-5557) NULLIF topic in reference manual should explain NULLIF
Date Tue, 10 Apr 2012 22:47:17 GMT

    [ https://issues.apache.org/jira/browse/DERBY-5557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13251142#comment-13251142

Dag H. Wanvik commented on DERBY-5557:

In the standard, both COALESCE and NULLIF are called "case abbreviations". Neither "function"
nor "expression" is used for these two builtins.
Syntactically, they are siblings, cf. this quote from SQL 2003:

<case abbreviation> ::=
NULLIF <left paren> <value expression> <comma> <value expression>
<right paren>
| COALESCE <left paren> <value expression>
{ <comma> <value expression> }... <right paren>

Both have parentheses around their arguments, so it is natural to think of them as "functions",
I guess. If we choose to call COALESCE a function, we should use that term for NULLIF, too.

> NULLIF topic in reference manual should explain NULLIF
> ------------------------------------------------------
>                 Key: DERBY-5557
>                 URL: https://issues.apache.org/jira/browse/DERBY-5557
>             Project: Derby
>          Issue Type: Improvement
>          Components: Documentation
>    Affects Versions:
>            Reporter: Knut Anders Hatlen
>            Assignee: Kim Haase
>         Attachments: DERBY-5557.diff, rrefcasenullif.html
> The section describing NULLIF in the reference manual is a bit cryptic. http://db.apache.org/derby/docs/10.8/ref/rrefcasenullif.html
> It says that NULLIF is used for conditional expressions, and that it is similar to CASE,
but it doesn't say in plain words how it works. It would be good if it could mention that
NULLIF returns NULL if the two arguments are equal, and that it returns the first argument
if they are not equal.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message