File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC 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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
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