I want to insert values in a table, but if some values is equal i want the query ignore this line
For example, let's take this table :
A B C D
1 null 2 3
1 null 2 4
insert into table(a,b,c,d)
values(1, null, 2, 5)
on conflict(A, B, C) do nothing
If the values of columns A,B,C are equal to the values in the insert query, then the query shouldn't do anything but this new line is insert and the table update to this: A B C D 1 null 2 3 1 null 2 4 1 null 2 5
But the with the 'do nothing' clause that line shouldn't to insert.
I don't know why, but postgres doesn't understand null
= null
and add the values in the table. How can I make the query don't insert this line?