O'Reilly logo

MySQL 8 Cookbook by Karthik Appigatla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Other functions

Some of the other functions are as follows:

  • JSON_KEYS(): Gets all the keys in a JSON document:
mysql> SELECT JSON_KEYS(details) FROM emp_details WHERE emp_no = 1;*************************** 1. row ***************************JSON_KEYS(details): ["email", "phone", "address", "nickname", "locatation"]
  •  JSON_LENGTH(): Gives the number of elements in a JSON document:
mysql> SELECT JSON_LENGTH(details) FROM emp_details WHERE emp_no = 1;*************************** 1. row ***************************JSON_LENGTH(details): 5

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required