简体   繁体   English

MySQL表字段名称

[英]Mysql table field name

I have a table named school, but its there in two databases D1 AND D2 . 我有一个名为school的表,但它存在于两个数据库D1D2 First 10 records are there in D1 database and the rest 10 records in Database D2 . 前10条记录在D1数据库中其余10条记录在数据库D2中

There is a field name name . 有一个字段名称name How can i combine table school from 2 databases. 我怎样才能结合2个数据库中的表school

since in query I have a portion like 因为在查询中我有一部分

where institution.iname=school.name ,  

here since school is fetched from 2 databases ,How can I achieve this. 在这里,由于学校是从2个数据库中提取的,我该如何实现。 THanks 谢谢

Check this out. 检查这个出来。 Great stuff. 好东西。 Good luck! 祝好运!

SELECT d1.* FROM database1.school d1 LEFT JOIN database2.school d2 ON d1.name=d2.name WHERE d2.name IS NOT NULL;

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

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