8
I have the following structure:
http://sqlfiddle.com/#! 9/738aa6/1
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 an example of 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 have tried using PIVOT, but I do not know why in my bank gives an error stating that this function does not exist. And Group_Concat
tbm doesn’t help because it takes everything and plays in a single row.
My query did not get perfomatic (because of my entire select), taking 44 seconds to execute. But you SOLVED my problem. If I could give it 5 stars. hahha. Thanks. ♥
– Layla Comparin
Unfortunately it doesn’t get fast at all. But it has already decided to help rs. For nothing ;)
– Clayton Tosatti