Sqlserver 中 用where筛选后 是不是后面直接 用 连接查询 如 inner join ,left Join..
declare@dempnointselect@dempno=deptNofromemployeewhereempName='张三'select*fromemployee...
declare @dempno int
select @dempno = deptNo from employee where empName = '张三'
select * from employee as e where deptNo = @dempno inner join dept d 展开
select @dempno = deptNo from employee where empName = '张三'
select * from employee as e where deptNo = @dempno inner join dept d 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询