I have the following structure:
CREATE TABLE Viagem (
Idasemvolta int,
Idacomvolta int
);
INSERT INTO Viagem
VALUES (64, 39)
With the following select:
select Idasemvolta, Idacomvolta from viagem
This is not the complete structure of the table, this was just one example that brought out how the numbers are appearing. At the moment, they're coming like this:
Idasemvolta Idacomvolta
64 39
And I need the structure to be this:
Tipo Valor
Idasemvolta 64
Idacomvolta 39
I've tried using PIVOT, but I do not know why my bank gives an error stating that this function does not exist. And Group_Concat
tbm does not help because it takes everything and plays on a single line.