Home >Backend Development >PHP Tutorial >MYSQL如何建立两个表共用一个ID字段

MYSQL如何建立两个表共用一个ID字段

WBOY
WBOYOriginal
2016-06-13 10:26:231237browse

MYSQL怎么建立两个表共用一个ID字段
MYSQL怎么建立两个表共用一个ID字段

------解决方案--------------------
只要两个表的id字段 类型和值 一样就行,连接时:

SQL code
select a.id,* from a join b on a.id=b.id;<div class="clear">
                 
              
              
        
            </div>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn