By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE `clients` (
`id` smallint(5) UNSIGNED NOT NULL,
`name` varchar(32) DEFAULT NULL,
`phones` json DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
insert into `clients` values
(1, 'пользователь 1', '["380990000123"]'),
(2, 'пользователь 2', '[]'),
(3, 'пользователь 3', '["380991234567","380958877654", "380958877655"]');
select
replace(replace(replace(replace(phones,', ',' '),'"',''),'[',''),']','') phones
from clients;
phones |
---|
380990000123 |
380991234567 380958877654 380958877655 |