Home
The Toolkit for Online Communities
17460 Community Members, 1 member online, 217 visitors today
Log In Register
OpenACS Home : Forums : OpenACS Q&A : copletely unique index on foo_map : One Message

Forum OpenACS Q&A: Re: copletely unique index on foo_map

Collapse
Posted by Tilmann Singer on
There might be a better way, but in this case you could define that one field of the mapping table always contains the lower key and the other the higher:

(foo_id_lower integer references table1(foo_id) not null, foo_id_higher integer references table1(foo_id) not null, constraint  foo_id_lower < foo_id_higher)

(not sure about the constraint syntax)