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

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

  • <tfoot id='rDxVx'></tfoot>

      1. <legend id='rDxVx'><style id='rDxVx'><dir id='rDxVx'><q id='rDxVx'></q></dir></style></legend>

        • <bdo id='rDxVx'></bdo><ul id='rDxVx'></ul>

        MySQL FULL JOIN 不工作,但 RIGHT 和 LEFT 连接工作

        MySQL FULL JOIN not working but RIGHT and LEFT join works(MySQL FULL JOIN 不工作,但 RIGHT 和 LEFT 连接工作)
        <tfoot id='wHesQ'></tfoot>

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

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

                <legend id='wHesQ'><style id='wHesQ'><dir id='wHesQ'><q id='wHesQ'></q></dir></style></legend>

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

                  本文介绍了MySQL FULL JOIN 不工作,但 RIGHT 和 LEFT 连接工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  这让我发疯.我有两个表,我试图在其上执行连接,usersXstats 和 usersXstats_alltime.

                  This is driving me nuts. I have two tables that I am attempting to preform a join on, usersXstats and usersXstats_alltime.

                  两个表具有相同的列:id、userId、statId 和 value

                  Both tables have the same columns: id, userId, statId, and value

                  我想做的是

                  SELECT * 
                  FROM usersXstats 
                  FULL JOIN usersXstats_alltime 
                  ON usersXstats.userId=usersXstats_alltime.userId 
                  AND usersXstats.statId=usersXstats_alltime.statId
                  

                  然而这又回来了

                  Unknown column 'usersXstats.userId' in 'on clause'
                  

                  当用 LEFT JOIN、RIGHT JOIN 或 INNER JOIN 替换 FULL JOIN 时,此查询按预期工作.

                  This query works just as expected when replacing FULL JOIN with LEFT JOIN, RIGHT JOIN, or INNER JOIN.

                  为了更容易阅读,我写了以下查询:

                  To make it easier to read initially I wrote the following query:

                  SELECT * 
                  FROM usersXstats as uxs 
                  FULL JOIN usersXstats_alltime as uxsat 
                  ON uxs.userId=uxsat.userId 
                  AND uxs.statId=uxsat.statId
                  

                  返回不同的错误:

                  检查与您的 MySQL 服务器版本相对应的手册,了解在第 1 行的FULL JOIN usersXstats_alltime as uxsat ON uxs.userId=uxsat.userId AND uxs.statId"附近使用的正确语法

                  我到底做错了什么?提前致谢!

                  What on earth am I doing wrong? Thanks in advance!

                  推荐答案

                  MySQL 不支持 FULL JOIN

                  MySQL doesn't support FULL JOIN

                  http://en.wikipedia.org/wiki/Join_%28SQL%29#Full_outer_join

                  这篇关于MySQL FULL JOIN 不工作,但 RIGHT 和 LEFT 连接工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  How to update a record using sequelize for node?(如何使用节点的 sequelize 更新记录?)
                  How to provide a mysql database connection in single file in nodejs(如何在 nodejs 中的单个文件中提供 mysql 数据库连接)
                  Looping Over Result Sets in MySQL(在 MySQL 中循环结果集)
                  FULL OUTER JOIN with SQLite(使用 SQLite 进行完全外部联接)
                  Writing an SQL query to SELECT item from the following table(编写 SQL 查询以从下表中选择项目)
                  Converting MySQL code to Access: GROUP_CONCAT and a triple JOIN(将 MySQL 代码转换为 Access:GROUP_CONCAT 和三重 JOIN)
                        <tbody id='Dp8SJ'></tbody>
                        <i id='Dp8SJ'><tr id='Dp8SJ'><dt id='Dp8SJ'><q id='Dp8SJ'><span id='Dp8SJ'><b id='Dp8SJ'><form id='Dp8SJ'><ins id='Dp8SJ'></ins><ul id='Dp8SJ'></ul><sub id='Dp8SJ'></sub></form><legend id='Dp8SJ'></legend><bdo id='Dp8SJ'><pre id='Dp8SJ'><center id='Dp8SJ'></center></pre></bdo></b><th id='Dp8SJ'></th></span></q></dt></tr></i><div id='Dp8SJ'><tfoot id='Dp8SJ'></tfoot><dl id='Dp8SJ'><fieldset id='Dp8SJ'></fieldset></dl></div>
                        <legend id='Dp8SJ'><style id='Dp8SJ'><dir id='Dp8SJ'><q id='Dp8SJ'></q></dir></style></legend>

                        1. <tfoot id='Dp8SJ'></tfoot>
                            <bdo id='Dp8SJ'></bdo><ul id='Dp8SJ'></ul>
                          • <small id='Dp8SJ'></small><noframes id='Dp8SJ'>