select top 11 * from table1 where a+b not in (select top 19 a+b from table1)20-30共11条记录.

解决方案 »

  1.   

    select top 30 * from table1
    minus
    select top 20 * from table2
      

  2.   

    好像结果还是不行,crazyfor你考虑到单个主键值一样的情况了吗
      

  3.   

    select top 11 * from table1 where a+','+b not in (select top 19 a+','+b from table1)
    单个主键一样没有关系的啊.
      

  4.   

    将 varchar 值 ',' 转换为数据类型为 int 的列时发生语法错误。出现以上问题,a,b为int
      

  5.   

    select top 11 * from table1 where cast(a varchar)+','+cast(b as varchar) not in (select top 19 cast(a varchar)+','+cast(b as varchar) from table1)
      

  6.   

    还的,次carazyfor等会儿我给你加分,
      

  7.   

    carazyfor你有qq吗,以后联系,我跟你交个朋友