Oracle将查询的结果放入一张自定义表中并再查询数据

前端之家收集整理的这篇文章主要介绍了Oracle将查询的结果放入一张自定义表中并再查询数据前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

如下的实际例子代码可以将查询的结果放入到一张自定义表中,同时可以再从这个自定义的表中查询数据:

sql;"> 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,NUMBEROFDAYS FROM REPORT_PERFORMANCEOFANALYZER REPORT_PERFORMANCEOFANALYZER_1) SELECT TICKETNUMBER,NUMBEROFDAYS,(SELECT COUNT(GISPROCESSID) AS COUNTTICKETS FROM AA) COUNTTICKETS FROM AA ORDER BY USERNAME;
原文链接:https://www.f2er.com/oracle/65275.html

猜你在找的Oracle相关文章