sooxin-JAVA

          兩條SQL語句

          取出一個表中某字段相同的數(shù)據(jù)
          select top 339 * from Sheet  where carNO in (select carNO from Sheet group by carNO having count(*)>1) order by carNO DESC

          對比兩表中區(qū)分的數(shù)據(jù)并提出

          select   *   from   B   where   checksum(*)   not   in   (select   checksum(*)   from   A)
          select   *   from   kehu   where   checksum(車牌)   not   in   (select   checksum(車牌)   from   member)  and  checksum(客戶名稱)

          表示是A表有,B表沒有的數(shù)據(jù).

          posted on 2007-11-20 10:38 sooxin 閱讀(142) 評論(0)  編輯  收藏 所屬分類: SQL

          主站蜘蛛池模板: 鸡西市| 镇巴县| 青神县| 寿宁县| 新宾| 临沭县| 天祝| 渭南市| 通河县| 稻城县| 轮台县| 黎城县| 莒南县| 永川市| 鹤峰县| 永仁县| 当阳市| 瓮安县| 武夷山市| 鄂尔多斯市| 东宁县| 天津市| 民和| 团风县| 玉屏| 得荣县| 大同县| 孟州市| 卢龙县| 昌乐县| 山西省| 醴陵市| 措勤县| 长治县| 长乐市| 延津县| 昆明市| 台东市| 肃宁县| 磴口县| 阿荣旗|