-1
我有一个SQL Server查询,看起来像这样:SQL Server查询返回许多笛卡尔积
select
ISNULL(UPPER(w.role), '-') as 'Position Title',
concat ('SGD ',m.expectedSalary) as 'Expected Salary',
(cast(w.endYear as int) - cast(w.startYear as int)) as 'Experience',
mq.Qualification as 'Education Level',
ISNULL(ms.specialisation, '-') as 'Specialisation',
mj.dateApplied as 'Date of Application'
from
WorkExpr w,
Member m,
MemberQlftn mq,
MemberSpln ms,
MemberJob mj
where
mj.jobNumber = (select jobNumber
from MemberJob
where email = '[email protected]')
它应该返回我的人的详细信息(如位置瓦,期望薪金等)谁已申请与阿兰相同的工作(该电子邮件是'[email protected]')。然而,当我运行这个查询时,当我只想回来时,我获得了超过6000行的数据。谁能告诉我我做错了什么?由于
你知道你还没有加入任何这些表吗? – GurV
@GurV我怎么知道它是否加入? –
[请先在JOIN上检查一些基本的SQL教程](https://www.tutorialspoint.com/sql/sql-using-joins.htm) – GurV