Posts by miguelbgouveia • 111 points
1 post
-
1
votes3
answers421
viewsA: Query with conditions in SQL SERVER
I think if you use left Join to relate the two tables it will be simpler: SELECT p.id_postagem, p.titulo, a.nome FROM postagem p LEFT JOIN autor a ON p.id_autor = a.id_autor WHERE postagem_pai…