469,356 Members | 2,460 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,356 developers. It's quick & easy.

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
Jun 27 '08 #1
2 3784
jo**********@weltbild.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
Jun 27 '08 #2
>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.
Jun 27 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Edmund Dengler | last post: by
1 post views Thread by huyuhui | last post: by
3 posts views Thread by Helen Wheels | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.