mercredi 4 mars 2015

PostgreSQL ORDER BY array


How do I ORDER BY the first value in the array values from a column?


Here is an example of the data...



/* machine_number column */
{16,24}
{27}
{19}
{4,10}


So in example I'd like to ORDER BY ? ASC; and have the "following" returned...



/* machine_number column */
{4,10}
{16,24}
{19}
{27}




Aucun commentaire:

Enregistrer un commentaire