vendredi 27 février 2015

How to select 2 values in SQL case statement?

Consider this query:



SELECT CASE
WHEN identifier = 'V' THEN pos_x, pos_y
WHEN identifier = 'D' THEN height, weight
END
FROM sprite_data;


This generates an error, because (how I understand it) the case statement can only return one value, but I am trying to return 2 values (pos_x and pos_y OR height and width). How can I make the case statement return two values?


Aucun commentaire:

Enregistrer un commentaire