<i id='xi4Yw'><tr id='xi4Yw'><dt id='xi4Yw'><q id='xi4Yw'><span id='xi4Yw'><b id='xi4Yw'><form id='xi4Yw'><ins id='xi4Yw'></ins><ul id='xi4Yw'></ul><sub id='xi4Yw'></sub></form><legend id='xi4Yw'></legend><bdo id='xi4Yw'><pre id='xi4Yw'><center id='xi4Yw'></center></pre></bdo></b><th id='xi4Yw'></th></span></q></dt></tr></i><div id='xi4Yw'><tfoot id='xi4Yw'></tfoot><dl id='xi4Yw'><fieldset id='xi4Yw'></fieldset></dl></div>

    <small id='xi4Yw'></small><noframes id='xi4Yw'>

    <legend id='xi4Yw'><style id='xi4Yw'><dir id='xi4Yw'><q id='xi4Yw'></q></dir></style></legend>
    • <bdo id='xi4Yw'></bdo><ul id='xi4Yw'></ul>
    1. <tfoot id='xi4Yw'></tfoot>
    2. 仅从左联接的表中选择一些列

      Select only some columns from a table on a LEFT JOIN(仅从左联接的表中选择一些列)
    3. <small id='8o5Oo'></small><noframes id='8o5Oo'>

          • <legend id='8o5Oo'><style id='8o5Oo'><dir id='8o5Oo'><q id='8o5Oo'></q></dir></style></legend>
              <tbody id='8o5Oo'></tbody>
            <i id='8o5Oo'><tr id='8o5Oo'><dt id='8o5Oo'><q id='8o5Oo'><span id='8o5Oo'><b id='8o5Oo'><form id='8o5Oo'><ins id='8o5Oo'></ins><ul id='8o5Oo'></ul><sub id='8o5Oo'></sub></form><legend id='8o5Oo'></legend><bdo id='8o5Oo'><pre id='8o5Oo'><center id='8o5Oo'></center></pre></bdo></b><th id='8o5Oo'></th></span></q></dt></tr></i><div id='8o5Oo'><tfoot id='8o5Oo'></tfoot><dl id='8o5Oo'><fieldset id='8o5Oo'></fieldset></dl></div>

              <tfoot id='8o5Oo'></tfoot>

                <bdo id='8o5Oo'></bdo><ul id='8o5Oo'></ul>

              • 本文介绍了仅从左联接的表中选择一些列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                是否可以在 LEFT JOIN 的表中只选择一些列?

                Is it possible to select only some columns from a table on a LEFT JOIN?

                推荐答案

                当然.只需像在任何查询中一样列出您要选择的列:

                Of course. Just list the columns you want to select as you would in any query:

                SELECT table1.column1, table1.column2, table2.column3
                FROM table1
                LEFT JOIN table2 ON (...)
                

                请注意,我在所有列中都包含了 table1.table2. 前缀,以确保在其中存在同名字段时不会出现任何歧义两个表.

                Note that I've included the table1. or table2. prefix on all columns to be sure there aren't any ambiguities where fields with the same name exist in both tables.

                这篇关于仅从左联接的表中选择一些列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Building a comma separated list?(建立一个逗号分隔的列表?)
                Errors in SQL Server while importing CSV file despite varchar(MAX) being used for each column(尽管每列都使用了 varchar(MAX),但在导入 CSV 文件时 SQL Server 中出现错误)
                How to update a record using sequelize for node?(如何使用节点的 sequelize 更新记录?)
                How to provide a mysql database connection in single file in nodejs(如何在 nodejs 中的单个文件中提供 mysql 数据库连接)
                Defining a one-to-one relationship in SQL Server(在 SQL Server 中定义一对一关系)
                Looping Over Result Sets in MySQL(在 MySQL 中循环结果集)
                <tfoot id='FQsNa'></tfoot>
              • <small id='FQsNa'></small><noframes id='FQsNa'>

                    • <bdo id='FQsNa'></bdo><ul id='FQsNa'></ul>
                        <tbody id='FQsNa'></tbody>

                        1. <legend id='FQsNa'><style id='FQsNa'><dir id='FQsNa'><q id='FQsNa'></q></dir></style></legend>
                          <i id='FQsNa'><tr id='FQsNa'><dt id='FQsNa'><q id='FQsNa'><span id='FQsNa'><b id='FQsNa'><form id='FQsNa'><ins id='FQsNa'></ins><ul id='FQsNa'></ul><sub id='FQsNa'></sub></form><legend id='FQsNa'></legend><bdo id='FQsNa'><pre id='FQsNa'><center id='FQsNa'></center></pre></bdo></b><th id='FQsNa'></th></span></q></dt></tr></i><div id='FQsNa'><tfoot id='FQsNa'></tfoot><dl id='FQsNa'><fieldset id='FQsNa'></fieldset></dl></div>