gpt4 book ai didi

mysql - 解析查询时出错

转载 作者:可可西里 更新时间:2023-11-01 08:06:30 26 4
gpt4 key购买 nike

我需要帮助....我不擅长 SQL 我在尝试应用 JOIN 时遇到此错误:

[ Token line number = 1,Token line offset = 66,Token in error = JOIN ]

这是我的 SQL:

var query = "SELECT Team.TeamName, Fixtures.HomeTeam" +
"FROM Team" +
"LEFT JOIN Fixtures" +
"ON Team.TeamId=Fixtures.HomeTeam" +
"ORDER BY Team.TeamName";

团队表有 PK:TeamId夹具表有 FK:HomeTeam我正在使用 WebMatrix 2。Razor 网页

最佳答案

行连接之间没有空格。更改每一行以在末尾包含空格。

var query = "SELECT Team.TeamName, Fixtures.HomeTeam " +
"FROM Team " +
"LEFT JOIN Fixtures " +
"ON Team.TeamId=Fixtures.HomeTeam " +
"ORDER BY Team.TeamName";

关于mysql - 解析查询时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13919322/

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