11g里面用listagg: select listagg(name,',') within (order by id) from table 10g里面用wm_concat:select wm_ ...
通过oracle自带的wmsys.wm concat方法,该方法是将记录的值使用逗号间隔拼接,如果想其它分隔符分割,可用replace使用方法如下:select wmsys.wm concat name name from idtable NAME dd,mn,po ...
2015-12-22 19:19 0 3086 推荐指数:
11g里面用listagg: select listagg(name,',') within (order by id) from table 10g里面用wm_concat:select wm_ ...
with temp as( select 'China' nation ,'Guangzhou' city from dual union all select 'China' nation ,'Sh ...
未合并情况 SELECT a.id, b.name AS "role" FROM sys_user a INNER JOIN sys_user_role c ON a.id=c.u ...
未合并情况 SELECT a.id, b.name AS "role" FROM sys_user a INNER JOIN sys_user_role c ON a.id=c.user_id ...
需要用wm_concat函数来实现。 如目前在emp表中查询数据如下: 要按照deptno相同的将ename以字符串形式合并,可用如下语句: 1 select ...
MySQL中: ...
1.迭代列表,连续使用‘+’操作依次拼接每一个字符串 2.字符串直接相加 返回结果: abc abc123 abc123def abc123def456 abc123def456hig abc123def456hig789 3.使用 str.join() 方法 返回 ...