I need to create an INSERT where it is checked whether the value already exists. I looked at some posts, but I can not execute.
INSERT INTO 'pagina_extra' ('ID_PExtra', 'ordem_paginas', 'id_menu', 'url_seo', 'url', 'nome', 'titulo', 'conteudo', 'exibir', 'interno')
SELECT * FROM (SELECT 'NULL', '3', '1', 'downloads', 'pag_downloads.php', 'Downloads', '', '', 'N', 'N') AS tmp
WHERE NOT EXISTS (
SELECT url_seo FROM pagina_extra WHERE url_seo = 'downloads'
) LIMIT 1;
Error that appears when I go directly to Phpmyadmin:
Duplicate column name 'Downloads'
But there is no value to accuse duplicate. What's wrong?