gpt4 book ai didi

Mysql Join条件连接同一服务器中的两个数据库

转载 作者:行者123 更新时间:2023-11-29 21:46:25 25 4
gpt4 key购买 nike

select first_name, last_name, amount, payment_date 
from customer_db.customer_data c
join employee_db.payment e
on c.customer_id= e.payment_id
where customer_db.customer_data(customer_id)='6';

我正在获取

12:05:54    select first_name, last_name, amount, payment_date  from customer_db.customer_data c join employee_db.payment e on c.customer_id= e.payment_id  where customer_db.customer_data(customer_id)='6' LIMIT 0, 1000
Error Code: 1305. FUNCTION customer_db.customer_data does not exist 0.000 sec

最佳答案

您正在尝试调用函数:

where customer_db.customer_data(customer_id)='6';
^-----------^

也许你的意思是

where customer_db.customer_data.customer_id='6';
^---

相反?

关于Mysql Join条件连接同一服务器中的两个数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34073228/

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