DeveloperBreeze

Tutorials Programming Tutorials, Guides & Best Practices

Explore 148+ expertly crafted tutorials tutorials, components, and code examples. Stay productive and build faster with proven implementation strategies and design patterns from DeveloperBreeze.

JSON Operations in MySQL: Examples and Use Cases

Cheatsheet August 21, 2024
json

ALTER TABLE users
ADD COLUMN theme VARCHAR(255) AS (preferences->>'$.theme'),
ADD INDEX (theme);

This command creates a virtual column theme extracted from the JSON data and indexes it.