一道由两张表组成的一个数据库的题目
1个回答
展开全部
1.
select Company_name
from company join employee_hired on company.company_id=employee_hired.company_id
where QUARTER=4
2.
select Company_name
from company
where company_id not in(select company_id from employee_hired where QUARTER between 1 and 3)
3
select Company_name,SUM(NUMBER)
from company join employee_hired on company.company_id=employee_hired.company_id
where QUARTER between 1 and 4
group by Company_name
追问
中间连接两张表的地方就只用join就可以了吗?不需要加inner吗
追答
如果是access环境需要加;如果是sql server或oracle,不需要加,默认是inner
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询