4
I am testing a query, where I would need the returns to come in separate columns, but the way below it returns in rows. I tried to use LEFT JOIN
but the syntax didn’t work.
select u.nome_completo AS NOME1 from usuarios u where u.cracha = 5357 UNION
select u.nome_completo AS NOME2 from usuarios u where u.cracha = 9999
Return of this query:
Intended return:
gives a search for Pivot Tables (http://stackoverflow.com/questions/7674786/mysql-pivot-table)
– Marciano.Andrade
@Marciano.Andrade had seen something about pivot Ables, but in my case it is not count, it would return the same query. I’m trying to do with left Join but it’s bone. Thank you so much for the tip.
– Diego