Oracle字符串分割Split(超简单一条sql解决)


SELECT (select wm_concat(name) from keming where instr(Course, code    ) > 0) FROM renyuan  where name ='张三'
解决如下问题
我现在有一个字段是存:1,2,3的,而它对应另一张值集表中。eg;

课程人员表 renyuan 
id    name     Course
1     张三      123

值集表    keming 
    code    name
     1       语文
     2       数字
      3       英语
………………

course 与code 关联   查询出结果为:

张三    语文,数字,英语

例子:

select distinct sc.park_count from screen_manager sc ,parklots p
where to_char(p.id) in (select belong_park from screen_manager) and sc.belong_park like  '%651%'  

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM