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

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

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

      <tfoot id='bjvx4'></tfoot>

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

      1. 如何從MySQL中的多個(gè)表中刪除?

        How to delete from multiple tables in MySQL?(如何從MySQL中的多個(gè)表中刪除?)

          <tbody id='Qp7oo'></tbody>

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

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

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

              <tfoot id='Qp7oo'></tfoot>

                  本文介紹了如何從MySQL中的多個(gè)表中刪除?的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我試圖一次從幾個(gè)表中刪除.我做了一些研究,并提出了這個(gè)

                  I am trying to delete from a few tables at once. I've done a bit of research, and came up with this

                  DELETE FROM `pets` p,
                              `pets_activities` pa
                        WHERE p.`order` > :order
                          AND p.`pet_id` = :pet_id
                          AND pa.`id` = p.`pet_id`
                  

                  但是,我收到此錯(cuò)誤

                  未捕獲的 Database_Exception [1064]:您的 SQL 語法有錯(cuò)誤;檢查與您的 MySQL 服務(wù)器版本相對應(yīng)的手冊,了解在 'p, pets_activities pa...

                  Uncaught Database_Exception [ 1064 ]: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'p, pets_activities pa...

                  我以前從來沒有做過交叉表刪除,所以我現(xiàn)在沒有經(jīng)驗(yàn),卡住了!

                  I've never done a cross table delete before, so I'm inexperienced and stuck for now!

                  我做錯(cuò)了什么?

                  推薦答案

                  DELETE 語句中使用 JOIN.

                  Use a JOIN in the DELETE statement.

                  DELETE p, pa
                        FROM pets p
                        JOIN pets_activities pa ON pa.id = p.pet_id
                       WHERE p.order > :order
                         AND p.pet_id = :pet_id
                  

                  或者你可以使用...

                  DELETE pa
                        FROM pets_activities pa
                        JOIN pets p ON pa.id = p.pet_id
                   WHERE p.order > :order
                     AND p.pet_id = :pet_id
                  

                  ...僅從 pets_activities

                  參見這個(gè).

                  對于單表刪除,但具有參照完整性,還有其他方法可以使用 EXISTSNOT EXISTSINNOT IN 等等.但是上面的那個(gè)你在FROM 子句之前用別名指定要從哪些表中刪除可以讓你更容易地?cái)[脫一些非常緊張的地方.我傾向于在 99% 的情況下使用 EXISTS,然后有 1% 的情況下使用這種 MySQL 語法.

                  For single table deletes, yet with referential integrity, there are other ways of doing with EXISTS, NOT EXISTS, IN, NOT IN and etc. But the one above where you specify from which tables to delete with an alias before the FROM clause can get you out of a few pretty tight spots more easily. I tend to reach out to an EXISTS in 99% of the cases and then there is the 1% where this MySQL syntax takes the day.

                  這篇關(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ù)幀讀取?)
                • <i id='0xVo1'><tr id='0xVo1'><dt id='0xVo1'><q id='0xVo1'><span id='0xVo1'><b id='0xVo1'><form id='0xVo1'><ins id='0xVo1'></ins><ul id='0xVo1'></ul><sub id='0xVo1'></sub></form><legend id='0xVo1'></legend><bdo id='0xVo1'><pre id='0xVo1'><center id='0xVo1'></center></pre></bdo></b><th id='0xVo1'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='0xVo1'><tfoot id='0xVo1'></tfoot><dl id='0xVo1'><fieldset id='0xVo1'></fieldset></dl></div>

                    <legend id='0xVo1'><style id='0xVo1'><dir id='0xVo1'><q id='0xVo1'></q></dir></style></legend>

                      <tfoot id='0xVo1'></tfoot>

                          <bdo id='0xVo1'></bdo><ul id='0xVo1'></ul>

                            <tbody id='0xVo1'></tbody>

                          <small id='0xVo1'></small><noframes id='0xVo1'>

                            主站蜘蛛池模板: 亚洲国产一区二区三区 | 久久一区二区三区四区五区 | 欧美精品三区 | 亚洲在线| 神马久久久久久久久久 | 国产视频中文字幕 | 日本在线免费 | 日韩色在线 | 日韩一二区 | 久久久久国产成人精品亚洲午夜 | 日本午夜免费福利视频 | 欧美日韩在线播放 | 欧美极品一区二区 | 麻豆亚洲 | 自拍偷拍亚洲视频 | 亚洲精品久久久久久久久久久 | 精品欧美一区二区三区免费观看 | 国产在线1区 | 国产激情在线 | 中文字幕一区二区三区四区五区 | 国产毛片视频 | 成人免费淫片aa视频免费 | 国产激情在线观看 | 国产日韩一区二区 | 国产.com | 亚洲欧美日韩精品久久亚洲区 | 欧美一级在线 | 精品美女在线观看视频在线观看 | 精品免费国产一区二区三区四区介绍 | 成人中文字幕av | 国产在线中文字幕 | 色视频免费 | 亚洲高清在线观看 | 最新av在线网址 | 成人午夜免费视频 | 夜操 | 免费在线一区二区三区 | 国产精品高潮呻吟久久 | av网站在线免费观看 | 国产电影一区二区在线观看 | 亚洲精品视频在线播放 |