发错了!
这个才对!select distinct customer_name
from borrower, loan
where borrower.loan_number = loan.loan_number and
branch_name = 'Perryridge' and
(branch_name, customer_name) in
(select branch_name, customer_name
from dopositor, account
where dopositor.account_number = account.account_number )
服务器: 消息 170,级别 15,状态 1,行 5
第 5 行: ',' 附近有语法错误。

解决方案 »

  1.   

    (branch_name, customer_name) in
    (select branch_name, customer_name
    from dopositor, account
    where dopositor.account_number = account.account_number )这种写法是错误的。
      

  2.   

    如果branch_name+customer_name是唯一的话,可以这么写
    select distinct customer_name
    from borrower, loan
    where borrower.loan_number = loan.loan_number and
    branch_name = 'Perryridge' and
    branch_name+customer_name in
    (select branch_name+customer_name
    from dopositor, account
    where dopositor.account_number = account.account_number )
      

  3.   

    同意 huohw(子非鱼,安知鱼之乐?)