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