MySQL Select all columns from one table and some from another table(MySQL 从一个表中选择所有列,从另一个表中选择一些列)
问题描述
如何使用 JOIN 从一个表中选择所有列,而从另一个表中仅选择一些列?在 MySQL 中.
How do you select all the columns from one table and just some columns from another table using JOIN? In MySQL.
推荐答案
就用表名:
SELECT myTable.*, otherTable.foo, otherTable.bar...
这将选择 myTable
中的所有列以及 otherTable
中的 foo
和 bar
列.
That would select all columns from myTable
and columns foo
and bar
from otherTable
.
这篇关于MySQL 从一个表中选择所有列,从另一个表中选择一些列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!