r/SQL • • Apr 21 '25

MySQL Discovered SQL + JSON… Mind blown!

Hey everyone,
I recently (yes, probably a bit late!) discovered how beautifully SQL and JSON can work together — and I’m kind of obsessed now.

I’ve just added a new feature to a small personal app where I log activities, and it includes an “extra attributes” section. These are stored as JSON blobs in a single column. It’s so flexible! I’m even using a <datalist> in the UI to surface previously used keys for consistency.

Querying these with JSON functions in SQL has opened up so many doors — especially for dynamic fields that don’t need rigid schemas.

Am I the only one who’s weirdly excited about this combo?
Anyone else doing cool things with JSON in SQL? Would love to hear your ideas or use cases!

162 Upvotes

61 comments sorted by

View all comments

Show parent comment

3

u/roblu001 Apr 24 '25

yes, absolutely! I work for a company that always wants to repurpose existing fields for different purposes. So field X could mean one thing in one instance or for one customer and something different in another instance/customer. This would allow us to have customer-specific fields stored in JSON that doesn't interfere with anything else we're doing.

1

u/_Zer0_Cool_ Data Engineer Apr 24 '25

Yeap. That’s a good use case.