gpt4 book ai didi

mysql - 错误代码 1241

转载 作者:行者123 更新时间:2023-11-28 23:36:12 25 4
gpt4 key购买 nike

我不明白我的代码有什么问题以及为什么这个错误不断弹出

CREATE VIEW LocUserComp AS
SELECT concat(location.Loc_Address, location.Loc_City,
location.Loc_State) AS Customer_Address,
(users.User_FName, users.User_LName) AS Customer_Name
FROM location
JOIN users
ON location.Loc_ID=Users.Loc_ID

最佳答案

在两列两边加上括号。我认为您打算再进行一次 concat():

CREATE VIEW LocUserComp AS
SELECT concat(l.Loc_Address, l.Loc_City, l.Loc_State) AS Customer_Address,
concat(u.User_FName, u.User_LName) AS Customer_Name
FROM location l JOIN
users u
ON l.Loc_ID = u.Loc_ID;

关于mysql - 错误代码 1241,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35678270/

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