dimanche 24 janvier 2016

SQLITE - Flatten a key-value table into columns

How would I go from a table like

key | value
----+-------
a   | ~~~~
b   | ~~~~
c   | ~~~~
d   | ~~~~

to something like the below

a | b | c | d
--+---+---+---
1 | 2 | 3 | 4

using sqlite?

Or rather how would I convert a table with multiple rows into a table with columns named after the keys of the previous table?

Aucun commentaire:

Enregistrer un commentaire