MySQL - How to create a new table that is a join on primary key of two existing tables

前端 未结 4 1723
旧巷少年郎
旧巷少年郎 2021-02-05 17:39

I have two existing tables, with different fields, except for Primary ID (a varchar, not an int). I want to create a third table which is essentially a

4条回答
  •  臣服心动
    2021-02-05 18:10

    For MS SQL use this

    SELECT * INTO result 
    FROM  table1
    INNER JOIN table2
    ON table1.id = table2.id
    

提交回复
热议问题