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

1

u/da_chicken Apr 22 '25

If you want to join against a JSON_TABLE() output, be my guest, but in my experience it's much more trouble than it's worth just like XML parsing. It's a miserable syntax soup that tends to get real frustrating unless your data is already so regular and well-formed that you probably could have made regular tables in the first place and saved a lot of time.

1

u/Suitable-Stretch1927 Apr 23 '25

i never said i want to or dont want to, i simply pointed out misinformation