MySQL Select all columns from one table and some from another table

后端 未结 4 1093
不知归路
不知归路 2020-11-30 16:46

How do you select all the columns from one table and just some columns from another table using JOIN? In MySQL.

4条回答
  •  春和景丽
    2020-11-30 17:44

    Just use the table name:

    SELECT myTable.*, otherTable.foo, otherTable.bar...
    

    That would select all columns from myTable and columns foo and bar from otherTable.

提交回复
热议问题