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]

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


i've use a UNIQUE COMPOSITE INDEX in the past that seems to get around the
problem

-----Original Message-----
From: Peter Hearty [mailto:peter.hearty@lutris.com]
Sent: Friday, January 26, 2001 5:25 AM
To: instantDB@enhydra.org
Subject: Re: InstantDB: need to create a unique primary key on multiple
columns, how?


Jon

I'm afraid you've just hit a limitation in the current IDB syntax. I 
don't think there's currently a way to do this. Like you say, you 
either have to create the primary key when the table gets created, or 
settle for a non-unique one when it gets altered.

Regards

Pete

----- Original Message -----
From: Jonathan Lai Lam <jlailam@hemtech.co.za>
Date: Wednesday, January 24, 2001 3:25 pm
Subject: 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 
> triedto 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
> 

----------------------------------------------------------------------------
-
To unsubscribe from this mailing list, send email to majordomo@enhydra.org
with the text "unsubscribe instantdb" in the body of the email.
If you have other questions regarding this mailing list, send email to
the list admin at owner-instantdb@enhydra.org.
-----------------------------------------------------------------------------
To unsubscribe from this mailing list, send email to majordomo@enhydra.org
with the text "unsubscribe instantdb" in the body of the email.
If you have other questions regarding this mailing list, send email to
the list admin at owner-instantdb@enhydra.org.