Showing entries 1 to 10 of 767
10 Older Entries »
Connector/NET 6.10

Connector/NET 6.10 (6.10.8 GA, published on Tuesday, 14 Aug 2018)

Output MySQL in JSON Format

I was recently asked if there is anyway to select non-JSON data from a MySQL database and output that data in JSON format. There are two very easy ways to to this.

JSON Array

If you need a JSON array, it is very easy to use the JSON_ARRAY() function. Simply select the columns you want as the argument to JSON_ARRAY()


SQL> select
json_array(continent,Population, Code)
from country
limit 5;
+----------------------------------------+
| json_array(continent,Population, Code) |
+----------------------------------------+
| ["North America", 103000, "ABW"] |
| ["Asia", 22720000, "AFG"] |
| ["Africa", 12878000, "AGO"] |
| ["North America", 8000, "AIA"] |
| ["Europe", 3401200, "ALB"] |
+----------------------------------------+
5 rows in set (0.0006 sec)

JSON_OBJECT

[Read more]
Connector/ODBC 5.3

Connector/ODBC 5.3 (5.3.11 GA, published on Monday, 30 Jul 2018)

MySQL Installer 5.7

MySQL Installer 5.7 (5.7.23 GA, published on Friday, 27 Jul 2018)

MySQL Installer 5.6

MySQL Installer 5.6 (5.6.41 GA, published on Friday, 27 Jul 2018)

MySQL Community Server 5.5

MySQL Community Server 5.5 (5.5.61 GA, published on Friday, 27 Jul 2018)

MySQL Cluster 7.3

MySQL Cluster 7.3 (7.3.22 GA, published on Friday, 27 Jul 2018)

MySQL Cluster 7.2

MySQL Cluster 7.2 (7.2.34 GA, published on Friday, 27 Jul 2018)

MySQL Community Server 5.6

MySQL Community Server 5.6 (5.6.41 GA, published on Friday, 27 Jul 2018)

MySQL Community Server 5.7

MySQL Community Server 5.7 (5.7.23 GA, published on Friday, 27 Jul 2018)

Showing entries 1 to 10 of 767
10 Older Entries »