I have a database where I need to avoid inserting duplicates. The requirements are:
For the subset of rows with matching column 1, there can not be any that have the same column 2.
For the subset of rows with matching column 1, there can not be any that have the same column 3 and 4.
I'm new to SQL so is there a way of setting these relationships when I create the database (create table) or do I have to do a select and do these checks manually before inserting into the table?