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

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

    1. <tfoot id='bWXpP'></tfoot>

    2. MySQL如何连接两个字段上的表

      MySQL how to join tables on two fields(MySQL如何连接两个字段上的表)

          <bdo id='aobWj'></bdo><ul id='aobWj'></ul>

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

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

            <tfoot id='aobWj'></tfoot>

                本文介绍了MySQL如何连接两个字段上的表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我有两个带有 dateid 字段的表.我想加入这两个领域.我试过

                I have two tables with date and id fields. I want to join on both fields. I tried

                JOIN t2 ON CONCAT(t1.id, t1.date)=CONCAT(t2.id, t2.date)
                

                可以,但是速度很慢.有没有更好的方法来做到这一点?

                that works, but it is very slow. is there a better way to do this?

                推荐答案

                JOIN t2 ON t1.id=t2.id AND t1.date=t2.date
                

                这篇关于MySQL如何连接两个字段上的表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                相关文档推荐

                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 中循环结果集)
                  <tbody id='asmjV'></tbody>
                <legend id='asmjV'><style id='asmjV'><dir id='asmjV'><q id='asmjV'></q></dir></style></legend>
                <tfoot id='asmjV'></tfoot>
              1. <small id='asmjV'></small><noframes id='asmjV'>

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