Wednesday, July 6, 2011

Composite keys

If you have a database table which holds keys from another two tables and you do not want duplications, you may want to do the following


ALTER TABLE
ADD UNIQUE (, )


Now the database will ensure not entries have the same key1+key2 combination!

No comments: