码迷,mamicode.com
首页 > 其他好文 > 详细

相同表结构不同记录

时间:2015-05-19 22:19:53      阅读:138      评论:0      收藏:0      [点我收藏+]

标签:

  SELECT * FROM ( SELECT  ISA.FLIGHTTIME    AS 表名,  * FROM ISA.DBO.AIRLINES_FLIGHTTIME    EXCEPT  SELECT B表 AS 表名,  * FROM ISA510.DBO.AIRLINES_FLIGHTTIME ) a
   UNION ALL
   SELECT * FROM ( SELECT  ISA510.FLIGHTTIME AS 表名,  * FROM ISA510.DBO.AIRLINES_FLIGHTTIME EXCEPT  SELECT A表 AS 表名,  * FROM ISA.DBO.AIRLINES_FLIGHTTIME ) b
  

 

相同表结构不同记录

标签:

原文地址:http://www.cnblogs.com/moonwind/p/4515443.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!