Derby
  1. Derby
  2. DERBY-4000

Reference manual leaves != out of list of boolean operators

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.5.1.1
    • Fix Version/s: 10.6.1.0
    • Component/s: Documentation
    • Labels:
      None

      Description

      Table 1, SQL Boolean Operators, at <URL:http://db.apache.org/derby/docs/dev/ref/rrefsqlj23075.html> lists the comparison operators <, =, >, <=, >=, <>. Derby also accepts !=, which I believe has the same meaning as <>. The != operator should be documented along with the other operators. (I haven't checked whether != is standard SQL.)

      ij> select * from (values 1,2,3)v where x != 2;
      X
      -----------
      1
      3

      2 rows selected
      ij> select * from (values 1,2,3)v where x <> 2;
      X
      -----------
      1
      3

      2 rows selected

      1. DERBY-4000.diff
        1 kB
        Kim Haase
      2. rrefsqlj23075.html
        12 kB
        Kim Haase

        Activity

        Knut Anders Hatlen created issue -
        Hide
        Dag H. Wanvik added a comment -

        Section 5.2 of SQL 2003 lists only '<>':

        <not equals operator> ::= <>

        so '!=' is non-standard SQL.

        Show
        Dag H. Wanvik added a comment - Section 5.2 of SQL 2003 lists only '<>': <not equals operator> ::= <> so '!=' is non-standard SQL.
        Hide
        Knut Anders Hatlen added a comment -

        Thanks for checking the standard, Dag. If we document '!=' we should mention that it is non-standard.

        Both MySQL and PostgreSQL accept '!=' instead of '<>', according to their documentation:

        http://dev.mysql.com/doc/refman/5.1/en/comparison-operators.html#operator_not-equal
        http://www.postgresql.org/docs/8.3/interactive/functions-comparison.html

        Show
        Knut Anders Hatlen added a comment - Thanks for checking the standard, Dag. If we document '!=' we should mention that it is non-standard. Both MySQL and PostgreSQL accept '!=' instead of '<>', according to their documentation: http://dev.mysql.com/doc/refman/5.1/en/comparison-operators.html#operator_not-equal http://www.postgresql.org/docs/8.3/interactive/functions-comparison.html
        Myrna van Lunteren made changes -
        Field Original Value New Value
        Affects Version/s 10.5.1.1 [ 12313771 ]
        Affects Version/s 10.5.0.0 [ 12313010 ]
        Hide
        Kim Haase added a comment -

        This is low-hanging fruit – I'm attaching DERBY-4000.diff and rrefsqlj23075.html (Boolean expressions), with a note added to the table row on comparison operators. We don't have much precedent for talking about nonstandard items, so I hope this language is acceptable.

        I also added a missing space after a comma in the note on LIKE expressions.

        Show
        Kim Haase added a comment - This is low-hanging fruit – I'm attaching DERBY-4000 .diff and rrefsqlj23075.html (Boolean expressions), with a note added to the table row on comparison operators. We don't have much precedent for talking about nonstandard items, so I hope this language is acceptable. I also added a missing space after a comma in the note on LIKE expressions.
        Kim Haase made changes -
        Attachment DERBY-4000.diff [ 12436366 ]
        Attachment rrefsqlj23075.html [ 12436367 ]
        Kim Haase made changes -
        Assignee Kim Haase [ chaase3 ]
        Kim Haase made changes -
        Issue & fix info [Patch Available]
        Hide
        Knut Anders Hatlen added a comment -

        Thanks Kim! Both the patch and the html look good. +1 to commit.

        Show
        Knut Anders Hatlen added a comment - Thanks Kim! Both the patch and the html look good. +1 to commit.
        Hide
        Kim Haase added a comment -

        Thanks very much, Knut!

        Committed patch DERBY-4000.diff to documentation trunk at revision 915031.

        Show
        Kim Haase added a comment - Thanks very much, Knut! Committed patch DERBY-4000 .diff to documentation trunk at revision 915031.
        Kim Haase made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Issue & fix info [Patch Available]
        Fix Version/s 10.6.0.0 [ 12313727 ]
        Resolution Fixed [ 1 ]
        Knut Anders Hatlen made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Gavin made changes -
        Workflow jira [ 12449276 ] Default workflow, editable Closed status [ 12799676 ]

          People

          • Assignee:
            Kim Haase
            Reporter:
            Knut Anders Hatlen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development