UC Unique constraints



IBM's flagship relational database management system

UC Unique constraints

Postby atodpquery » Sat Oct 31, 2009 1:58 am

I am trying to delete a group of DB2 tables of which some are parent and some are child. Parent has unique constraints on. I delete all the children tables and there is no problem but not the parent. What is unique constraints? How can I delete them without dropping the table. Where can I get some help from this.

:oops: :roll: ;) :lol: :idea:
atodpquery
 
Posts: 31
Joined: Sat Nov 15, 2008 3:40 pm
Has thanked: 0 time
Been thanked: 0 time

Re: UC Unique constraints

Postby dick scherrer » Sat Oct 31, 2009 2:45 am

Hello,

I believe you have something confused. Unique Constraints are not related to parent/child table relationships.

A Unique Constraint is a rule that values entered for some key must be unique. For example if a key is "country_code" and only one of each "country value" is allowed, this could be enforced by a unique constraint.

I delete all the children tables and there is no problem but not the parent.
I don't know what this means - please clarify.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: UC Unique constraints

Postby atodpquery » Thu Nov 05, 2009 5:12 pm

Thanks for clarify UC. I have -532 when trying to delete a table. this table is a parent table of two child. I have successfully deleted the two child tables but when I delete the parent table I have -532 saying the relationship constraints exist and i could not work out why.

:oops: :idea:
Thanks.
atodpquery
 
Posts: 31
Joined: Sat Nov 15, 2008 3:40 pm
Has thanked: 0 time
Been thanked: 0 time

Re: UC Unique constraints

Postby dick scherrer » Fri Nov 06, 2009 1:27 am

Hello,

The -532 provides the name of the constraint that was violated. . .

Did you read the documentation for the -532?
http://publibz.boulder.ibm.com/cgi-bin/ ... /2.1.6.232
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post