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: constraint usage


i don't believe instantdb supports the constraint keyword. i think you need
to setup a compound index with unique on it

-----Original Message-----
From: Chiwei Chang [mailto:chiwei@DataChannel.com]
Sent: Wednesday, May 17, 2000 1:18 PM
To: 'instantdb@enhydra.org'
Subject: InstantDB: constraint usage


Hi:
      I could not find an example of using contraint with instantDB, and
keep getting parser errors.  

      What I want is to declare id and principal as primary keys in my_test
table, but I will get SQLException 

      Don't understand SQL after: "CREATE"
      Expected: "UNIQUE" found: "CONSTRAINT"



e CREATE TABLE my_test_parent(
           id numeric(19,0) auto increment primary key 
   );

e CREATE TABLE my_test(
 	id  numeric(19,0)  NOT NULL ,
	principal varchar (255)  NOT NULL ,
	test varchar (20) NULL ,
	num Value numeric(10,0) NULL,
 
	CONSTRAINT  PRIMARY KEY id, principle
            CONSTRAINT  FOREIGN KEY  id  REFERENCES  my_test_parent
);


TIA

Chiwei
----------------------------------------------------------------------------
-
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.