pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

  • <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="xba0r5u" 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 中加入同一個(gè)表,兩次?

        How do you join on the same table, twice, in mysql?(你如何在 mysql 中加入同一個(gè)表,兩次?)
        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="8hzubsn" 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 中加入同一個(gè)表,兩次?的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

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

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

                  另一個(gè)包含實(shí)際數(shù)據(jù),其中 2 列需要 TO 和 FROM 域名.所以我有 2 列 rev_dom_from 和 rev_dom_for,它們都存儲(chǔ)域表中的域名 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.

                  簡單.

                  現(xiàn)在我需要在網(wǎng)頁上實(shí)際顯示兩個(gè)域名.我知道如何通過 LEFT JOIN 域 ON review.rev_dom_for = domain.dom_url 查詢來顯示一個(gè)或另一個(gè),然后您回顯 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 列中與第二個(gè)域名相呼應(yīng)?

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

                  推薦答案

                  你會(huì)使用另一個(gè)連接,大致如下:

                  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 個(gè)引用(一個(gè) FOR 和一個(gè) 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).

                  此時(shí),將 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 表的兩個(gè) LEFT JOINS 中選擇 DOM_URL 字段,通過引用域表的每個(gè)聯(lián)接的表別名來引用它們,并將它們別名為 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.

                  有關(guān) SQL 中別名的更多信息,請閱讀此處.

                  For more info about aliasing in SQL, read here.

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

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

                  相關(guān)文檔推薦

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

                      <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="70as505" 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>
                          • 主站蜘蛛池模板: YAGEO国巨电容|贴片电阻|电容价格|三星代理商-深圳市巨优电子有限公司 | 志高装潢官网-苏州老房旧房装修改造-二手房装修翻新 | 礼仪庆典公司,礼仪策划公司,庆典公司,演出公司,演艺公司,年会酒会,生日寿宴,动工仪式,开工仪式,奠基典礼,商务会议,竣工落成,乔迁揭牌,签约启动-东莞市开门红文化传媒有限公司 | 钢绞线万能材料试验机-全自动恒应力两用机-混凝土恒应力压力试验机-北京科达京威科技发展有限公司 | 机制砂选粉机_砂石选粉机厂家-盐城市助成粉磨科技有限公司 | 上海冠顶工业设备有限公司-隧道炉,烘箱,UV固化机,涂装设备,高温炉,工业机器人生产厂家 | 无水硫酸铝,硫酸铝厂家-淄博双赢新材料科技有限公司 | 免费分销系统 — 分销商城系统_分销小程序开发 -【微商来】 | 桌上式超净工作台-水平送风超净工作台-上海康路仪器设备有限公司 | MVR蒸发器厂家-多效蒸发器-工业废水蒸发器厂家-康景辉集团官网 | 台式核磁共振仪,玻璃软化点测定仪,旋转高温粘度计,测温锥和测温块-上海麟文仪器 | 安平县鑫川金属丝网制品有限公司,防风抑尘网,单峰防风抑尘,不锈钢防风抑尘网,铝板防风抑尘网,镀铝锌防风抑尘网 | 泰安办公家具-泰安派格办公用品有限公司 | 代写标书-专业代做标书-商业计划书代写「深圳卓越创兴公司」 | 集装箱箱号识别_自重载重图像识别_铁路车号自动识别_OCR图像识别 | 电机修理_二手电机专家-河北豫通机电设备有限公司(原石家庄冀华高压电机维修中心) | 航空铝型材,7系铝型材挤压,硬质阳*氧化-余润铝制品 | 无菌实验室规划装修设计-一体化实验室承包-北京洁净净化工程建设施工-北京航天科恩实验室装备工程技术有限公司 | 硅PU球场、篮球场地面施工「水性、环保、弹性」硅PU材料生产厂家-广东中星体育公司 | 减速机电机一体机_带电机减速器一套_德国BOSERL电动机与减速箱生产厂家 | 沈阳激光机-沈阳喷码机-沈阳光纤激光打标机-沈阳co2激光打标机 | 道达尔润滑油-食品级润滑油-道达尔导热油-合成导热油,深圳道达尔代理商合-深圳浩方正大官网 | 聚丙烯酰胺PAM-聚合氯化铝PAC-絮凝剂-河南博旭环保科技有限公司 巨野电机维修-水泵维修-巨野县飞宇机电维修有限公司 | 合肥升降机-合肥升降货梯-安徽升降平台「厂家直销」-安徽鼎升自动化科技有限公司 | 家用净水器代理批发加盟_净水机招商代理_全屋净水器定制品牌_【劳伦斯官网】 | 衢州装饰公司|装潢公司|办公楼装修|排屋装修|别墅装修-衢州佳盛装饰 | 提升海外网站流量,增加国外网站访客UV,定制海外IP-访客王 | 高尔夫球杆_高尔夫果岭_高尔夫用品-深圳市新高品体育用品有限公司 | 天然鹅卵石滤料厂家-锰砂滤料-石英砂滤料-巩义东枫净水 | 喷码机,激光喷码打码机,鸡蛋打码机,手持打码机,自动喷码机,一物一码防伪溯源-恒欣瑞达有限公司 | 厦门ISO认证|厦门ISO9001认证|厦门ISO14001认证|厦门ISO45001认证-艾索咨询专注ISO认证行业 | 新疆乌鲁木齐网站建设-乌鲁木齐网站制作设计-新疆远璨网络 | 智能化的检漏仪_气密性测试仪_流量测试仪_流阻阻力测试仪_呼吸管快速检漏仪_连接器防水测试仪_车载镜头测试仪_奥图自动化科技 | 领袖户外_深度旅游、摄影旅游、小团慢旅行、驴友网 | 高温链条油|高温润滑脂|轴承润滑脂|机器人保养用油|干膜润滑剂-东莞卓越化学 | 插针变压器-家用电器变压器-工业空调变压器-CD型电抗器-余姚市中驰电器有限公司 | 过滤器_自清洗过滤器_气体过滤器_苏州华凯过滤技术有限公司 | 凝胶成像仪,化学发光凝胶成像系统,凝胶成像分析系统-上海培清科技有限公司 | 石家庄小程序开发_小程序开发公司_APP开发_网站制作-石家庄乘航网络科技有限公司 | 水压力传感器_数字压力传感器|佛山一众传感仪器有限公司|首页 | 3d可视化建模_三维展示_产品3d互动数字营销_三维动画制作_3D虚拟商城 【商迪3D】三维展示服务商 广东健伦体育发展有限公司-体育工程配套及销售运动器材的体育用品服务商 |