(select distinct cno from borrow)
except
(select distinct cno from card)这么一句运行为什么错。。
消息 156,级别 15,状态 1,第 2 行
在关键字 'except' 附近有语法错误。

解决方案 »

  1.   

    select distinct cno from borrow
    except
    select distinct cno from card
      

  2.   

    select * from (select distinct cno from borrow)as a
    except
    select * from (select distinct cno from card) as b
      

  3.   

    都试了,为什么都是except处有错误、、、不能截图,可以截图我就截个上来。
      

  4.   

    我的数据库是SQL SERVER 2008...
    应该是有except的、
      

  5.   

    哎,不用except了。用not exist。
    select distinct cno from borrow
    where not exists
    (select distinct cno from card where borrow.cno=card.cno)