---
title: "sql"
author: "lan13217"
date: "2011-11-15T23:40:21Z"
tags: []
categories: ["数据库"]
slug: "sql"
draft: false
lastmod: "2011-11-15T23:40:21Z"
id: 1260828
url: "https://snowelf.iteye.com/blog/1260828"
---

```sql

select case when t1.pid is null then t2.pid else  t1.pid end 
from t1 full join t2 on t1.pid = t2.pid 


```

http://www.builder.com.cn/2007/1008/540581.shtml