久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

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

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

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

      <bdo id='fAcxq'></bdo><ul id='fAcxq'></ul>
  • <legend id='fAcxq'><style id='fAcxq'><dir id='fAcxq'><q id='fAcxq'></q></dir></style></legend>

        你如何在 mysql 中加入同一個表,兩次?

        How do you join on the same table, twice, in mysql?(你如何在 mysql 中加入同一個表,兩次?)
        1. <tfoot id='zbgsf'></tfoot>

        2. <legend id='zbgsf'><style id='zbgsf'><dir id='zbgsf'><q id='zbgsf'></q></dir></style></legend>
            <bdo id='zbgsf'></bdo><ul id='zbgsf'></ul>
            • <i id='zbgsf'><tr id='zbgsf'><dt id='zbgsf'><q id='zbgsf'><span id='zbgsf'><b id='zbgsf'><form id='zbgsf'><ins id='zbgsf'></ins><ul id='zbgsf'></ul><sub id='zbgsf'></sub></form><legend id='zbgsf'></legend><bdo id='zbgsf'><pre id='zbgsf'><center id='zbgsf'></center></pre></bdo></b><th id='zbgsf'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='zbgsf'><tfoot id='zbgsf'></tfoot><dl id='zbgsf'><fieldset id='zbgsf'></fieldset></dl></div>

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

                  <tbody id='zbgsf'></tbody>

                  本文介紹了你如何在 mysql 中加入同一個表,兩次?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我有兩張桌子.一個(域)有域 id 和域名(dom_id、dom_url).

                  I have 2 tables. One (domains) has domain ids, and domain names (dom_id, dom_url).

                  另一個包含實際數據,其中 2 列需要 TO 和 FROM 域名.所以我有 2 列 rev_dom_from 和 rev_dom_for,它們都存儲域表中的域名 id.

                  the other contains actual data, 2 of which columns require a TO and FROM domain names. So I have 2 columns rev_dom_from and rev_dom_for, both of which store the domain name id, from the domains table.

                  簡單.

                  現在我需要在網頁上實際顯示兩個域名.我知道如何通過 LEFT JOIN 域 ON review.rev_dom_for = domain.dom_url 查詢來顯示一個或另一個,然后您回顯 dom_url,這將回顯 rev_dom_for 列中的域名.

                  Now I need to actually display both domain names on the webpage. I know how to display one or the other, via the LEFT JOIN domains ON reviews.rev_dom_for = domains.dom_url query, and then you echo out the dom_url, which would echo out the domain name in the rev_dom_for column.

                  但是我如何讓它在 dom_rev_from 列中與第二個域名相呼應?

                  But how would I make it echo out the 2nd domain name, in the dom_rev_from column?

                  推薦答案

                  你會使用另一個連接,大致如下:

                  you'd use another join, something along these lines:

                  SELECT toD.dom_url AS ToURL, 
                      fromD.dom_url AS FromUrl, 
                      rvw.*
                  
                  FROM reviews AS rvw
                  
                  LEFT JOIN domain AS toD 
                      ON toD.Dom_ID = rvw.rev_dom_for
                  
                  LEFT JOIN domain AS fromD 
                      ON fromD.Dom_ID = rvw.rev_dom_from
                  

                  編輯:

                  您所做的只是多次加入表格.查看帖子中的查詢:它從評論表(別名為 rvw)中選擇值,該表為您提供了對域表的 2 個引用(一個 FOR 和一個 FROM).

                  All you're doing is joining in the table multiple times. Look at the query in the post: it selects the values from the Reviews tables (aliased as rvw), that table provides you 2 references to the Domain table (a FOR and a FROM).

                  此時,將 Domain 表左連接到 Reviews 表是一件簡單的事情.一次(別名為 toD)用于 FOR,第二次(別名為 fromD)用于 FROM.

                  At this point it's a simple matter to left join the Domain table to the Reviews table. Once (aliased as toD) for the FOR, and a second time (aliased as fromD) for the FROM.

                  然后在 SELECT 列表中,您將從 DOMAIN 表的兩個 LEFT JOINS 中選擇 DOM_URL 字段,通過引用域表的每個聯接的表別名來引用它們,并將它們別名為 ToURL 和 FromUrl.

                  Then in the SELECT list, you will select the DOM_URL fields from both LEFT JOINS of the DOMAIN table, referencing them by the table alias for each joined in reference to the Domains table, and alias them as the ToURL and FromUrl.

                  有關 SQL 中別名的更多信息,請閱讀此處.

                  For more info about aliasing in SQL, read here.

                  這篇關于你如何在 mysql 中加入同一個表,兩次?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How to use windowing functions efficiently to decide next N number of rows based on N number of previous values(如何有效地使用窗口函數根據 N 個先前值來決定接下來的 N 個行)
                  reuse the result of a select expression in the quot;GROUP BYquot; clause?(在“GROUP BY中重用選擇表達式的結果;條款?)
                  Does ignore option of Pyspark DataFrameWriter jdbc function ignore entire transaction or just offending rows?(Pyspark DataFrameWriter jdbc 函數的 ignore 選項是忽略整個事務還是只是有問題的行?) - IT屋-程序員軟件開發技
                  Error while using INSERT INTO table ON DUPLICATE KEY, using a for loop array(使用 INSERT INTO table ON DUPLICATE KEY 時出錯,使用 for 循環數組)
                  pyspark mysql jdbc load An error occurred while calling o23.load No suitable driver(pyspark mysql jdbc load 調用 o23.load 時發生錯誤 沒有合適的驅動程序)
                  How to integrate Apache Spark with MySQL for reading database tables as a spark dataframe?(如何將 Apache Spark 與 MySQL 集成以將數據庫表作為 Spark 數據幀讀取?)

                      <legend id='9VMpQ'><style id='9VMpQ'><dir id='9VMpQ'><q id='9VMpQ'></q></dir></style></legend>

                        <small id='9VMpQ'></small><noframes id='9VMpQ'>

                      1. <i id='9VMpQ'><tr id='9VMpQ'><dt id='9VMpQ'><q id='9VMpQ'><span id='9VMpQ'><b id='9VMpQ'><form id='9VMpQ'><ins id='9VMpQ'></ins><ul id='9VMpQ'></ul><sub id='9VMpQ'></sub></form><legend id='9VMpQ'></legend><bdo id='9VMpQ'><pre id='9VMpQ'><center id='9VMpQ'></center></pre></bdo></b><th id='9VMpQ'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='9VMpQ'><tfoot id='9VMpQ'></tfoot><dl id='9VMpQ'><fieldset id='9VMpQ'></fieldset></dl></div>
                          <tbody id='9VMpQ'></tbody>

                          <tfoot id='9VMpQ'></tfoot>
                          • <bdo id='9VMpQ'></bdo><ul id='9VMpQ'></ul>
                          • 主站蜘蛛池模板: 久久毛片| 日日日干干干 | 精品成人在线视频 | 精品久久久久一区二区国产 | 亚洲男人天堂 | 欧美日韩一区二区三区视频 | 91福利在线观看视频 | 91久久久久久 | 国产一级淫片a直接免费看 免费a网站 | 成人亚洲精品 | 成人av一区 | 一区二区久久 | 求毛片| av网站免费 | 一级大片网站 | 99精品一区二区 | 久久精品色欧美aⅴ一区二区 | 日韩一区二区在线观看视频 | 国产精品69毛片高清亚洲 | h片在线免费看 | 国产乱码精品一区二区三区五月婷 | 免费激情av| 国产精品明星裸体写真集 | 久久亚洲精品国产精品紫薇 | 色综合中文| 成人在线小视频 | 久久大陆| 亚洲一区二区三区视频在线 | 国产一区二区三区四区五区3d | www.日韩系列 | 亚洲三区在线观看 | 国产精品电影网 | 欧美日韩久久精品 | 国产精品视频免费看 | 91精品一区 | 国产丝袜一区二区三区免费视频 | 一二三四在线视频观看社区 | 欧美涩涩网| 国产一区二区三区免费观看视频 | 在线播放国产一区二区三区 | 久久综合香蕉 |