简体   繁体   English

Select 一个表的所有列和另一个表的一些列

[英]Select all columns from one table and some from another table

How do you select all the columns from one table and just some columns from another table using JOIN?你如何 select 一个表中的所有列和另一个表中的一些列使用 JOIN? In SQL.在 SQL。

SELECT A.*, B.column1, B.column2
FROM A
LEFT JOIN B ON A.id=B.column3

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从一个表中选择所有列,其中某些列与另一个选择匹配 - Select all from one table where some columns match another select SQL选择一个表中的所有列和另一个表上另一列的最大值 - SQL Select all columns from one table and Max value of another column on another table 从一个表中选择所有列,从另一个表中选择一个列,其中列等于变量 - Select all columns from one table and one from another where column equals variable 从一个表中选择与另一个表中的ID匹配的所有列 - Select all columns from a table that matches an id in another table 将所有数据从一个动态创建的表移动到另一个不包括某些列 - Moving All Data From One Dynamic Created Table To Another Excluding Some Columns Select 基于条件的一个表中的所有记录,而不是另一个表中的所有记录 - Select all records from one table not in another table based on a condition 从一个表中选择所有内容,从另一个SQL中选择某些列 - Select everything from one table, and certain columns from another SQL 从一个表中选择计数,从另一个ORACLE中选择列 - Select count from one table, and columns from another ORACLE 从表中选择设置了其他所有列的表中的行 - Select rows from table where all columns in another are set 从一个表中全选,从另一个表中计数,并包含空值 - Select all from one table and count from another and include nulls
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM