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

Documentation implies column NOT NULL constraint cannot be named, but it can be.

    XMLWordPrintableJSON

Details

    Description

      Cf syntax description in ref/rrefsqlj16095.html:

      Column-level-constraint

      {
      NOT NULL |
      [ [CONSTRAINT constraint-Name]
      {
      CHECK (searchCondition) |

      { PRIMARY KEY | UNIQUE | REFERENCES clause }

      }
      }

      but actually this works:

      create table t(i int constraint foo not null); The curly braces around primary, unique and references are redundant as well.

      Attachments

        1. DERBY-6298.diff
          1.0 kB
          Camilla Haase
        2. rrefsqlj16095.html
          3 kB
          Camilla Haase
        3. rrefsqlj16095.html
          3 kB
          Camilla Haase
        4. DERBY-6298-2.diff
          1 kB
          Camilla Haase

        Activity

          People

            chaase3 Camilla Haase
            dagw Dag H. Wanvik
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: