'''
select a.id,
substring_index(substring_index(a.bill_ids, ',', b.id), ',', -1) bill_ids,
a.status,
a.card_name
from (select id, bill_ids,status,card_name
from af_repayment
where bill_ids<>' ') a
join af_activity_model b on b.id <= (length(a.bill_ids) - length(replace(a.bill_ids, ',', ''))+1)
order by a.id
'''
如对本文有疑问, 点击进行留言回复!!
MySQL-关系代数-并、交、差、等值连接、自然连接、左连接。。。
网友评论