执行 SELECT userid FROM userinfo 得到 1 2 3 4 如果要得到 1,2,3, ...
>>> ls1 = ['a', 1, 'b', 2] >>> ls2 = [str(i) for i in ls1] >>> ls2 ['a ...
import stringlis=[1,2,3,'abc']fw=open('hello.txt','w',encoding='utf-8')# print(''.join(str(lis).repl ...
with temp as( select 'China' nation ,'Guangzhou' city from dual union all select 'China' nation ,'Sh ...
通过oracle自带的wmsys.wm_concat方法,该方法是将记录的值使用逗号间隔拼接,如果想其它分隔符分割,可用replace使用方法如下:select wmsys.wm_concat(name) name from idtable;NAME---------- ---------------------------------------------------------------- ...
11g里面用listagg: select listagg(name,',') within (order by id) from table 10g里面用wm_concat:select wm_ ...