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%'  

 

posted @ 2017-06-20 14:07  李清欣  阅读(19392)  评论(2编辑  收藏  举报