Oracle将查询的结果放入一张自定义表中并再查询数据
程序员文章站
2023-11-06 23:45:52
如下的实际例子代码可以将查询的结果放入到一张自定义表中,同时可以再从这个自定义的表中查询数据:
with aa as
(select ticketnumber,...
如下的实际例子代码可以将查询的结果放入到一张自定义表中,同时可以再从这个自定义的表中查询数据:
with aa as (select ticketnumber, tickettype, versionnumber, stagename, dtanalyzed, gisprocessid, processstatus, dtreceived, userid, username, firstname, lastname, numberofdays from report_performanceofanalyzer where (dtanalyzed is null) union all select ticketnumber, tickettype, versionnumber, stagename, dtanalyzed, gisprocessid, processstatus, dtreceived, userid, username, firstname, lastname, numberofdays from report_performanceofanalyzer report_performanceofanalyzer_1) select ticketnumber, tickettype, versionnumber, stagename, dtanalyzed, gisprocessid, processstatus, dtreceived, userid, username, firstname, lastname, numberofdays, (select count(gisprocessid) as counttickets from aa) counttickets from aa order by username;
上一篇: 究竟吃完柿子能喝酸奶吗?
下一篇: 用bert训练模型并转换为pb格式