aspose file tools
The moose likes JDBC and Relational Databases and the fly likes CONSTRAINT clause help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "CONSTRAINT clause help" Watch "CONSTRAINT clause help" New topic
Author

CONSTRAINT clause help

Mr. C Lamont Gilbert
Ranch Hand

Joined: Oct 05, 2001
Posts: 1170

I am trying to create a table that has a couple of unique fields like so

Where containableGraphics is another table with the fields ID and ParentID. I am trying to say that Position(s) are UNIQUE with respect to each Parent. But I don't think this type of constraint will work. I can always do this;


But I didnt want to redundantly enter the ContainerID when this info is also referred to by the containableGraphics ID since a containableGraphics can have only 1 parent which is a containerGraphics.
Any ideas on this??
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: CONSTRAINT clause help