美文网首页
怎么查询多值代码中的某一个(ArteryBase)

怎么查询多值代码中的某一个(ArteryBase)

作者: 奇哥威武 | 来源:发表于2016-12-05 09:41 被阅读0次

使用函数 regexp_split_to_table()

实例 aj 中的 ajsj 是多值代码 查询 为8的

SELECT t_ajsj.c_bh from
(
SELECT c_bh,regexp_split_to_table(c_ajsj,';') as ajcj from t_aj where c_ajsj is not null) t_ajsj where t_ajsj.ajcj = '8'

会把里面的多值代码拆成子表

相关文章

网友评论

      本文标题:怎么查询多值代码中的某一个(ArteryBase)

      本文链接:https://www.haomeiwen.com/subject/zoskmttx.html