简体   繁体   English

Access SQL中INNER JOIN的语法正确吗?

[英]Correct syntax for INNER JOIN in Access SQL?

There's an error in join syntax. 连接语法中有错误。 And I can't find it at all. 而且我根本找不到。

<asp:AccessDataSource ID="fav_data" runat="server" DataFile="~/paperhome_data.accdb"
                                SelectCommand="INNER JOIN (SELECT * FROM [music_data] [music_junc] ON [music_d_id].[music_data]=[music_d_id].[music_junc]) WHERE ([profile_id] = 2)"></asp:AccessDataSource>
                            <SelectParameters>
                        <asp:Parameter DefaultValue="2" Name="profile_id" Type="Boolean" />
                    </SelectParameters>

It's not easy to guess what you are trying to, but it could be something like this: 猜测要尝试的内容并不容易,但可能是这样的:

"SELECT * FROM [music_data] INNER JOIN [music_junc] ON [music_data].[music_d_id]=[music_junc].[music_d_id]) WHERE ([profile_id] = 2)"

It seems as you really need to read up on SQL syntax. 看来您确实需要阅读SQL语法。 You will get nowhere trying to write SQL in the wild. 您将无济于事地尝试编写SQL。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM