InstantDB Project
About InstantDB
Project Mail Lists
Short History
Reporting Bugs
Screen Shots
3rd Party Examples
FAQs

Software
Downloads
Documentation
CVS Repositories
Roadmap
License

About Enhydra.org
Who We Are
News, Articles & Events
Getting Involved
Contact Us

Community
Demos
Contributions
Resources
Case Studies
On The Edge! -NEW-
Commercial Vendors


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

InstantDB: need to create a unique primary key on multiple columns, how?


Hi there...

I need to create a unique primary key on multiple columns.  I have tried to do it in the tables create statement and that works, however if
I do it in an alter table she seems to moan?  I am running version 3.25.

Here is the code which I am having some trouble with:

e alter table EstimateAttributeValue
    add UNIQUE PRIMARY KEY (estimateId, attributeId)
 
this works if I leave the unique out, but then I can insert duplicates. Is there a cleaner alternitive than creating a unique index on
the same column as the primary key?

if possible could you please send some sample code to do this.

Thank you kindly

Jon