SELECT CI_ID,TO_CHAR(WM_CONCAT(STU_NAME)) STU_NAMES
FROM (SELECT * FROM PM_CI,PM_STU
WHERE INSTR(STU_IDS,STU_ID)<>0)
GROUP BY CI_ID
FROM (SELECT * FROM PM_CI,PM_STU
WHERE INSTR(STU_IDS,STU_ID)<>0)
GROUP BY CI_ID
SELECT CI_ID,WM_CONCAT(STU_NAME) STU_NAMES
FROM (SELECT CI_ID,STU_NAME FROM PM_CI,PM_STU
WHERE INSTR(STU_IDS,STU_ID)<>0) GROUP BY CI_ID,结果是正确的,可是出现了一个问题,STU_NAMES字段显示(HUGECLOB),只有点开后面的省略号才能看到字符串值,求解答
FROM (SELECT CI_ID,STU_NAME FROM PM_CI,PM_STU
WHERE INSTR(STU_IDS,STU_ID)<>0) GROUP BY CI_ID,结果是正确的,可是出现了一个问题,STU_NAMES字段显示(HUGECLOB),只有点开后面的省略号才能看到字符串值,求解答
最赞回答 / 慕的地2439609
把STU_NAMES用to_char转一下,to_char(WM_CONCAT(STU_NAME) )。应该是oracle高版本得到的WM_CONCAT结果默认是CLOB类型,用to_char转一下就能看到值了
2018-06-01
最赞回答 / qq_星逝风起_0
select ci_id,wm_concat(stu_name) stu_name from pn_ci a,pm_stu bwhere instr(stu_ids,stu_id)>0 group by ci_id;
2018-05-31
--oracle 右连接
Select d.deptno,d.dname,Count(e.empno) from emp e,dept d
Where e.deptno(+) = d.deptno
Group By d.deptno,d.dname
--mysql 右连接
Select d.deptno,d.dname,Count(e.empno)
from emp e Right Join dept d On e.deptno= d.deptno
Group By d.deptno,d.dname
Select d.deptno,d.dname,Count(e.empno) from emp e,dept d
Where e.deptno(+) = d.deptno
Group By d.deptno,d.dname
--mysql 右连接
Select d.deptno,d.dname,Count(e.empno)
from emp e Right Join dept d On e.deptno= d.deptno
Group By d.deptno,d.dname
2018-05-27
select deptno,listagg(ename,',') within group (order by deptno) enameList from emp group by deptno;
2018-05-16
哇塞,在找关于赵强老师今晚在课堂上提出来的关于Oracle表自连接的缺点及解决方法时,碰巧就找到赵强老师本人解答的视频了。厉害厉害,讲的依旧清晰明了!明白了。赞!
2018-04-20