use test
select * from sector
select * from staff
select emp.yg_id,emp.yg_name,sp.bm_name
from staff as emp,
(select sector.bm_id,sector.bm_name
from sector
where sector.bm_id>2) as sp
where staff.yg_bm=sector.bm_id出现错误:
服务器: 消息 107,级别 16,状态 3,行 1
列前缀 'staff' 与查询中所用的表名或别名不匹配。
服务器: 消息 107,级别 16,状态 1,行 1
列前缀 'sector' 与查询中所用的表名或别名不匹配。
表名无误 请问错哪了。
select * from sector
select * from staff
select emp.yg_id,emp.yg_name,sp.bm_name
from staff as emp,
(select sector.bm_id,sector.bm_name
from sector
where sector.bm_id>2) as sp
where staff.yg_bm=sector.bm_id出现错误:
服务器: 消息 107,级别 16,状态 3,行 1
列前缀 'staff' 与查询中所用的表名或别名不匹配。
服务器: 消息 107,级别 16,状态 1,行 1
列前缀 'sector' 与查询中所用的表名或别名不匹配。
表名无误 请问错哪了。
select * from sector
select * from staff
select emp.yg_id,emp.yg_name,sp.bm_name
from staff as emp,
(select sector.bm_id,sector.bm_name
from sector
where sector.bm_id>2) as sp
where emp.yg_bm=sp .bm_id
select * from sector
select * from staff select emp.yg_id,emp.yg_name,sp.bm_name
from staff as emp,
(select sector.bm_id,sector.bm_name
from sector
where sector.bm_id>2) as sp
where emp.yg_bm=sp.bm_id