how to enforce multiple unique fields in database table

Posted by oo on Stack Overflow See other posts from Stack Overflow or by oo
Published on 2010-03-27T16:13:27Z Indexed on 2010/03/27 16:23 UTC
Read the original article Hit count: 147

Filed under:
|
|

i have a table called Cars and the primary key of the table is 'id'. I also have a field called 'name'. I would like to make sure no one enters the same name twice even though it wont break my db integrity.

what is the best way of doing this?

© Stack Overflow or respective owner

Related posts about sql

Related posts about database-design