1
I am trying to execute this query, and it always gives me the following error:
1060 - Duplicate column name 'NULL'
INSERT INTO ce_coins_issued (idc, idu, year, ltr, issuing, status)
SELECT * FROM (SELECT 2,1,2002,NULL,NULL,'wallet') AS tmp
WHERE NOT EXISTS
(SELECT idc, idu, year, ltr, issuing, status FROM ce_coins_issued
WHERE idc = 1 AND year = 2002 AND ltr = NULL LIMIT 1)
The table is allowing fields to NULL, since it has given permission. As I realized, what makes this error is to have two NULL’s in SELECT, because if you remove one of them, the query already runs smoothly.
They can help why?
Thank you so much for your help!! :)
– Tiago165