I have a database something which appears like
Field1  |      Field 2     |     Field 3
abcdef          16 Apr            first
uyiuyt          16 Apr            second
abcdef          20 May            third
uyiuyt          20 May            four
abcdef          15 Jun            first
uyiuyt          15 Jun            second
I thought making Field1 and Field2 as unique keys so field1 and field2 are not getting repeated. I mean Field 1 can be repeated but for different date values.
I wanted the db to allow
 abcdef  16 Apr
 abcdef  20 May
 abcdef  15 Jun
But not
abcdef   16 Apr
 abcdef   16 Apr
But in db table, when I assign unique index to field1 and field2, even second row uyiuyt 16 Apr is not getting inserted, throwing the error duplicate entry for Field2.
Can somebody help me to solve this issue? thanks
 
    