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

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

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

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

  2. <tfoot id='0V3pI'></tfoot>

    1. Mysql 用同一表中的另一行值更新一行

      Mysql update a row with another row value in same table(Mysql 用同一表中的另一行值更新一行)
        <tbody id='mE0LD'></tbody>

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

            1. <small id='mE0LD'></small><noframes id='mE0LD'>

              <legend id='mE0LD'><style id='mE0LD'><dir id='mE0LD'><q id='mE0LD'></q></dir></style></legend>
              <tfoot id='mE0LD'></tfoot>
                <bdo id='mE0LD'></bdo><ul id='mE0LD'></ul>
              • 本文介紹了Mysql 用同一表中的另一行值更新一行的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                我有一張桌子.我想用同一個(gè)表中的第 10 行值更新第 5 行.例如:

                I have a table. I want to update the 5th row with 10th row values from the same table. For example:

                SlNo   Name Quali   Exp
                1        x   B.E     2
                2        y   BSC     3
                3        Z   B.A     1.5
                4        A   MSC     2
                5        B   MBA     5
                

                這里我想用第 5 行的值更新第二行.

                Here i want to update second row with the value of 5th row.

                這是我當(dāng)前的查詢:

                    UPDATE table 
                      SET Name=(select Name from table where slNo='5'),
                               Quali=(select Quali from  table where slNo='5'),
                               Exp=(select Exp from table where slNo='5') 
                      where slNo='3';
                

                這工作正常......但是如果有超過 20 列,以這種方式編寫查詢會(huì)變得很費(fèi)力,因?yàn)閷τ诿恳涣校冶仨毎硪粋€(gè)子查詢......還有其他方法可以編寫嗎?查詢以使用同一表中另一行的所有值更新整行?

                this is working fine ... but if there are more than 20 columns it becomes laborious to write a query this way, because for each column I have to include another sub-query... is there any other way to write query to update the whole row with all values from the other row in the same table?

                推薦答案

                使用多表的自聯(lián)接 UPDATE 語法:

                Use a self-join with the multiple table UPDATE syntax:

                UPDATE `table` AS t1 JOIN `table` AS t2 ON t2.slNo = 5
                SET    t1.Name = t2.Name, t1.Quali = t2.Quali, t1.Exp = t2.Exp
                WHERE  t1.slNo = 3
                

                這篇關(guān)于Mysql 用同一表中的另一行值更新一行的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                相關(guān)文檔推薦

                store_result() and get_result() in mysql returns false(mysql 中的 store_result() 和 get_result() 返回 false)
                Call to undefined function mysqli_result::num_rows()(調(diào)用未定義的函數(shù) mysqli_result::num_rows())
                PHP Prepared Statement Problems(PHP 準(zhǔn)備好的語句問題)
                mysqli_fetch_array returning only one result(mysqli_fetch_array 只返回一個(gè)結(jié)果)
                PHP MySQLi Multiple Inserts(PHP MySQLi 多次插入)
                How do I make sure that values from MySQL keep their type in PHP?(如何確保 MySQL 中的值在 PHP 中保持其類型?)

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

                • <legend id='IExWR'><style id='IExWR'><dir id='IExWR'><q id='IExWR'></q></dir></style></legend>
                    <tbody id='IExWR'></tbody>
                • <tfoot id='IExWR'></tfoot>

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

                          主站蜘蛛池模板: 亚洲一区 | 日韩一区二区在线视频 | 在线观看www| 自拍偷拍第一页 | 婷婷福利 | 欧美精品中文字幕久久二区 | 国产免费拔擦拔擦8x高清 | 久久精品色欧美aⅴ一区二区 | 男女免费在线观看视频 | 亚洲成人一区二区 | 国产精品久久久久久久久久东京 | 日韩欧美不卡 | 日韩av在线播 | 成人av一区二区三区 | 中文字幕在线第一页 | 久久高清 | 毛片免费在线观看 | www.久久艹 | 日韩无 | 日本特黄a级高清免费大片 特黄色一级毛片 | 日本不卡一区二区三区在线观看 | 人人色视频 | 天堂色网| 欧美成人h版在线观看 | 日本精品在线播放 | 99久久中文字幕三级久久日本 | 在线激情视频 | 亚洲日本一区二区三区四区 | 中文二区| 成人免费在线观看 | 91久久久久久久久久久久久 | 日韩1区2区 | 欧美一区二区二区 | 成人啊啊啊 | 99re国产精品 | 亚洲视频三 | 三级成人在线 | 国产日韩欧美中文字幕 | 久久久精品久久久 | 国产亚洲一区二区在线观看 | 国产精品一区二区三区久久 |