1 year, 2 months ago Jivan Pal

The use of `VIRTUAL` in the example means that you are correct. If you use `PERSISTENT` (or equivalently, `STORED`) instead, then the `jnorm` column will actually be stored in the db, but so too will the `val` column, doubling the storage used. Currently, having `BEFORE INSERT` and `BEFORE UPDATE` triggers with `SET NEW.val = JSON_NORMALIZE(NEW.val)` is the only way to do what we want.

1 year, 1 month ago Trevor Gross

Thanks for confirming, I added an issue to Jira for being able to do this without a trigger. Chime in if you'd use it

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.