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 depositor,account where depositor.account_number = account.account_number)
',' 附近有语法错误。
提示第3行附近有语法错误,环境是SQL2005 我是照着数据库原理方面的书敲的,是sql的不支持的原因吗?
请教下,先谢了!
解决方案 »
- 远程连接 问题
- 如何根据获取SQL SERVER 作业名称获取作业是否在运行
- SQL2012 安装错误
- 求 一存储进程的写法
- 如何配置 SQL Server 2008 以允许远程连接(最好有图片解析)?
- 本地程序无法连接远程的sql数据库
- 高难度!----------关于数据库数据写入数据问题!
- 我的sql2005企业版怎么安不上啊?没有SQL服务,只有管理工具
- 一个建立了非簇索引和一个Bit类型的字段进行比较,哪一个查询速度更快?
- 有一个查询请教一下各位高手!
- 在sql server 2005的查询操作中,为什么自己明明设置的term是不用许为空值null的,但是用了cube之后,结果内怎么会允许出现空值的呢?
- 将查询结果导出到EXCEL
select distinct customer_name from borrower ,loan
where borrower.loan_number = loan.loan_number and branch_name ='Perryridge'
and branch_name in (select branch_name
from depositor,account where depositor.account_number = account.account_number)
and customer_name in (select customer_name
from depositor,account where depositor.account_number = account.account_number)
select distinct customer_name from borrower a ,loan b
where borrower.loan_number = loan.loan_number and branch_name ='Perryridge'
--and (branch_name,customer_name) in (select branch_name,customer_name
and exists(select 1
from depositor,account where depositor.account_number = account.account_number
and a.branch_name =branch_name and a.customer_name = customer_name)--in不可以用多个字段
SQL code
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 depositor,account where depositor.account_number = account.account_number)
',' 附近有语法错误。
提示第3行附近有语法错误,环境是SQL2005 我是照着数据库原理方…
这里面只能有一个字段吧?