1
I need you to just display some record if the field id
table noticias
has no reference in the field idnoticia
table fotos_noticias
.
SELECT
noticias.id,
noticias.titulo,
noticias.slug,
fotos_noticias.foto
FROM noticias
INNER JOIN fotos_noticias
ON noticias.id <> fotos_noticias.idnoticia
WHERE
GROUP BY noticias.id
Unfortunately this SQL above displays all records without restriction
I recommend reading: Not IN or Not EXISTS which to use?
– Marconi
What is the database manager: Oracle Database? Mariadb? Postgresql? SQL Server?
– José Diz