i have simpe query so: insert mytable (col1, col2) values (1,2), (1,3), (2,2) i need check no duplicate values have been added check needs happen across both column: if value exists in col1 , col2 don't want insert. if value exists in 1 of columns not both then insert should go through.. in other words let's have following table: +-------------------------+ |____col1____|___col2_____| | 1 | 2 | | 1 | 3 | |______2_____|_____2______| inserting values (2,3) , (1,1) allowed, (1,3) not allowed. is possible where not exists check single time? may need insert 1000 values @ 1 time , i'm not sure whether doing where check on every single insert row efficient. edit: add question - if there's duplicate value across both columns, i'd query ignore specific row , continue onto inserting other values rather throwing error. what might want use either primary key or unique index across columns. afterw...