SELECT 'list.add("' || t.dummy || '");' as listFROM dual t where rownum < 600; 执行结果: SELECT '''' || t.dummy || ''',' as 查询出的字段加引号FROM dual t where rownum < 600; 执行结果:…
select b.* from oss_service_log a left join oss_service_log_detail b on a.pk_log = b.pk_log where a.pk_service = 'nc.ws.oss.bd.IUserGroupOpenService' and b.log_msg like '%河南佐今明医药%' order by a.ts desc; -- select b.* from oss_service_log a left join os…
select count(*) from (select count(*) from 表名称 group by 多种数据量 ) 表名; 举个栗子: 比如说我有一个数据类型的字段, 里面有很多种的数据类型. 而且每个数据类型都有近些年的数据. 就是有很多重复的数据类型的数据. 我的目的就是查询出 数据类型的个数. 先查询出不重复的数据类型. select count(*) from 表名称 group by SJLX; 然后我们在用count(*) 查询这些条目数的总个数. select cou…