zno2

mysql 截取字符串

#select SUBSTRING_INDEX('1,2', ',', 1);
SELECT
	*
FROM
	dis_disease
WHERE
	id = (
		SELECT
			SUBSTRING_INDEX(t.disease_ids, ',', 1)
		FROM
			crm_diagnosis t
		WHERE
			t.id = 547
	)

disease_ids

1,2,3,4

posted on 2016-08-05 18:00  zno2  阅读(146)  评论(0编辑  收藏  举报

导航