mysql 切割列成多行

2023-07-06  本文已影响0人  有趣有趣

SELECT
b.help_topic_id + 1 AS id,
substring_index( substring_index( a.Synonyms, '|', b.help_topic_id + 1 ), '|', - 1 ) AS NAME
FROM
gene_homo_sapiens as a
JOIN mysql.help_topic as b ON b.help_topic_id < LENGTH( a.Synonyms ) - LENGTH(
REPLACE ( a.Synonyms, '|', '' )) + 1
where a.GeneID='1'

上一篇下一篇

猜你喜欢

热点阅读