spring - mysql 如何实现多表跨库联合查询?
PHPz
PHPz 2017-04-17 15:43:30
0
1
485
PHPz
PHPz

学习是最好的投资!

répondre à tous(1)
巴扎黑

我的项目中也有很多跨库 表关联的查询,实现起来很简单:

    select 
        a.uid  
    from 
       ucenter.user a , database user_profile b 
   where a.uid = b.uid;

只要在表的前边加上库名即可。

这个是我项目中xml 中的一个例子,项目采用的是springmvc,持久层框架就是mybatis:

项目的数据源配置:

Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!