Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-4583

TRUE by itself is not accepted in WHERE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.5.3.0
    • 10.7.1.1
    • SQL
    • None
    • n/a
    • Deviation from standard

    Description

      A SELECT query with a literal boolean value in its WHERE clause results in a syntax error.

      How to reproduce:

      CREATE TABLE list (value VARCHAR(10));

      Given this table, the following queries result in a syntax error.

      SELECT * FROM list WHERE TRUE;
      SELECT * FROM list WHERE FALSE;
      SELECT * FROM list WHERE value='A' OR TRUE;

      Why is TRUE/FALSE not a boolean expression?

      Attachments

        1. derby-4583-01-ac-booleanLiterals.diff
          8 kB
          Richard N. Hillegas
        2. derby-4583-01-ad-booleanLiterals.diff
          8 kB
          Richard N. Hillegas

        Issue Links

          Activity

            People

              rhillegas Richard N. Hillegas
              wowtor Wouter
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: