| id | -> primary key, auto_increment
| v1 |
| v2 |
I want to make sure that there are no duplicate (v1, v2) pairs on insert. Is it possible via an SQL statement? Currently I do a select first and if there 's no result I continue with the insert.
I was wondering if there 's a better solution.