gpt4 book ai didi

sql-server - 微软 SQL 错误 :Incorrect syntax near the keyword 'on'

转载 作者:行者123 更新时间:2023-12-03 09:44:53 24 4
gpt4 key购买 nike

select * 
from other table inner join
(
select Count(*),
F1,F2,F3
from Table
group by F1,F2,F3
) on F1 = OtherF

关键字“on”附近的语法不正确。

最佳答案

您的子选择需要别名:

select * 
from other AS o
inner join ( select Count(*), F1,F2,F3
from Table
group by F1,F2,F3 ) AS x on F1 = o.OtherF

关于sql-server - 微软 SQL 错误 :Incorrect syntax near the keyword 'on' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4267579/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com