CHECK CONSTRAINT on DB2 V8 zOS

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • joerg.sailer@weltbild.com

    CHECK CONSTRAINT on DB2 V8 zOS

    Hello,
    is it possible to define a CHECK CONSTRAINT on a table, whereas the
    CHECK-OPTION will be a SELECT.
    With this CHECK CONSTRAINT i try to ensure, that there will allways a
    state only set once within several rows. If possible, does someone can
    provide an example ? I did not find anything in the docs.

    Thanks

    Joerg
  • Serge Rielau

    #2
    Re: CHECK CONSTRAINT on DB2 V8 zOS

    joerg.sailer@we ltbild.com wrote:
    Hello,
    is it possible to define a CHECK CONSTRAINT on a table, whereas the
    CHECK-OPTION will be a SELECT.
    With this CHECK CONSTRAINT i try to ensure, that there will allways a
    state only set once within several rows. If possible, does someone can
    provide an example ? I did not find anything in the docs.
    Check constraints are limited to data in the row.
    Have you considered using a trigger or an RI constraint?

    Cheers
    Serge
    --
    Serge Rielau
    DB2 Solutions Development
    IBM Toronto Lab

    Comment

    • --CELKO--

      #3
      Re: CHECK CONSTRAINT on DB2 V8 zOS

      >is it possible to define a CHECK CONSTRAINT on a table, whereas the CHECK-OPTION will be a SELECT. <<

      A check constraint must have search condition.
      >With this CHECK CONSTRAINT i try to ensure, that there will always a state only set once within several rows. <<
      That sounds like a UNIQUE constraint. Post better specifications and
      we can help you.

      Comment

      Working...