select SUBSTRING_INDEX(REPLACE(t,CONCAT(SUBSTRING_INDEX(t, '"week":', rowNo),'"week":"'),''),'"',1) as t from
(
SELECT a.*,(@rowNum:=@rowNum+1) as rowNo,length(t) - length( REPLACE(t,'},{','}{')) as num
from
(
select
'[{"startDate":"08:45","endDate":"17:45","week":"1"},{"startDate":"08:45","endDate":"17:45","week":"2"},{"startDate":"08:45","endDate":"17:45","week":"3"},{"startDate":"08:45","endDate":"17:45","week":"4"},{"startDate":"08:45","endDate":"17:45","week":"5"}]'
as t
)a JOIN(
select * from `table`,(Select (@rowNum :=0)) c
)b on 1=1
)x where rowNo<=num`table` 这个表可以随便一张数据库存在的表 并且条数要大于或等于num