Skip to content

Instantly share code, notes, and snippets.

@vyachin
Created April 8, 2025 23:37
Show Gist options
  • Select an option

  • Save vyachin/126cf7e53f7da495f441f0080de3e173 to your computer and use it in GitHub Desktop.

Select an option

Save vyachin/126cf7e53f7da495f441f0080de3e173 to your computer and use it in GitHub Desktop.
mysql json table extract
select distinct contacts.value
from club,
json_table(contacts, '$[*]' COLUMNS (
type VARCHAR(255) PATH '$.type',
value VARCHAR(255) PATH '$.value'
)
) contacts
where contacts.type = 'email'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment