Composite key

654 views
Skip to first unread message

Jonas Klemming

unread,
Jan 18, 2008, 6:14:03 AM1/18/08
to H2 Database
Hi,
Does H2 support composite primary keys? I can't find the syntax in the
docs.

Best,
Jonas

Jonas Klemming

unread,
Jan 18, 2008, 6:22:00 AM1/18/08
to H2 Database
Ignore, I got it:

CREATE TABLE IF NOT EXISTS ENTITY (
ID INT NOT NULL,
FIELD VARCHAR(50) NOT NULL,
VALUE OTHER,
PRIMARY KEY(ID, FIELD)
);
Reply all
Reply to author
Forward
0 new messages