关键字 ✀Select✀ 附近有语法错误

2025-12-15 02:59:18
推荐回答(2个)
回答1:

create后要加分号;sql 中不是所有的分号都可以省略的
create viewBTS_Max_Altitude(BscID,max_Altitude) as(
select BscID,max(Altitude)
from BTS
group by BscID
);
select BTS.*
from BTS,BTS_Max_Altitude
where BTS.Altitude =BTS_Max_Altitude.max_Altitude and BTS.BscID = BTS_Max_Altitude.BscID
drop view BTS_Max_Altitude

回答2:

BTS.* 这个中间不加点吧?!是加逗号吧!