---
title: "ORACLE union order by"
author: "p_3er"
date: "2014-06-18T11:36:00Z"
tags: []
slug: "oracle-union-order-by"
draft: false
lastmod: "2014-08-21T09:26:54Z"
id: 2106737
url: "https://p-3er.iteye.com/blog/2106737"
---

```
select * from (
select a.id,a.oacode,a.custid,a.custname,a.xsz,a.salename,a.communicationtheme,a.communicationproperty,a.communicationtime,a.productmanager,a.creator,a.createdate from technology_flow a 
where a.oastate='正常结束'
union 
select b.id,b.oacode,b.custid,b.custname,b.xsz,b.salename,b.communicationtheme,b.communicationproperty,b.communicationtime,b.productmanager,b.creator,b.createdate  from technology_support b
) t order by t.oacode desc
```