gpt4 book ai didi

MySQLWhere条件

转载 作者:行者123 更新时间:2023-11-29 13:28:17 24 4
gpt4 key购买 nike

在 MySQL DB 中,我遇到一个问题。

Table1 : Name1 - Name2; 
Table2: User;

Select ......
WHERE Table1.(Name1, ” ”, Name2) = Table2.User;

任何帮助如何将表 Name1 到表 Name2 连接成一个,然后使等于用户,因为我收到错误。

最佳答案

使用CONCAT函数。

SELECT ...
FROM Table1 t1
JOIN Table2 t2 ON CONCAT(t1.Name1, ' ', t1.Name2) = t2.User

关于MySQLWhere条件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19838148/

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