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

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

WBOY
Release: 2016-06-13 13:28:46
Original
1040 people have browsed it

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

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

SQL code

select a.id,* from a join b on a.id=b.id; <div class="clear">
                 
              
              
        
            </div>
Copy after login
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template