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

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

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

    <tfoot id='aGtg9'></tfoot>

        <bdo id='aGtg9'></bdo><ul id='aGtg9'></ul>

      1. <i id='aGtg9'><tr id='aGtg9'><dt id='aGtg9'><q id='aGtg9'><span id='aGtg9'><b id='aGtg9'><form id='aGtg9'><ins id='aGtg9'></ins><ul id='aGtg9'></ul><sub id='aGtg9'></sub></form><legend id='aGtg9'></legend><bdo id='aGtg9'><pre id='aGtg9'><center id='aGtg9'></center></pre></bdo></b><th id='aGtg9'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='aGtg9'><tfoot id='aGtg9'></tfoot><dl id='aGtg9'><fieldset id='aGtg9'></fieldset></dl></div>
      2. MySQL 錯誤 1215:無法添加外鍵約束

        MySQL Error 1215: Cannot add foreign key constraint(MySQL 錯誤 1215:無法添加外鍵約束)

            <tbody id='nTS4C'></tbody>
          <legend id='nTS4C'><style id='nTS4C'><dir id='nTS4C'><q id='nTS4C'></q></dir></style></legend>

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

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

            <bdo id='nTS4C'></bdo><ul id='nTS4C'></ul>

                <tfoot id='nTS4C'></tfoot>

                • 本文介紹了MySQL 錯誤 1215:無法添加外鍵約束的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在嘗試將我的新架構轉發到我的數據庫服務器上,但我不知道為什么我會收到這個錯誤.

                  I am trying to forward engineer my new schema onto my database server, but I can't figure out why I am getting this error.

                  我試圖在這里搜索答案,但我發現的所有內容都說要么將數據庫引擎設置為 InnoDB,要么確保我嘗試用作外鍵的鍵是主鍵他們自己的桌子.如果我沒記錯的話,這兩件事我都做過.我還能做什么?

                  I've tried to search for the answer here, but everything I've found has said to either set the database engine to InnoDB or to make sure the keys I'm trying to use as a foreign key are primary keys in their own tables. I have done both of these things, if I'm not mistaken. What else can I do?

                  Executing SQL script in server
                  
                  ERROR: Error 1215: Cannot add foreign key constraint
                  
                  -- -----------------------------------------------------
                  -- Table `Alternative_Pathways`.`Clients_has_Staff`
                  -- -----------------------------------------------------
                  

                  CREATE  TABLE IF NOT EXISTS `Alternative_Pathways`.`Clients_has_Staff` (
                    `Clients_Case_Number` INT NOT NULL ,
                    `Staff_Emp_ID` INT NOT NULL ,
                    PRIMARY KEY (`Clients_Case_Number`, `Staff_Emp_ID`) ,
                    INDEX `fk_Clients_has_Staff_Staff1_idx` (`Staff_Emp_ID` ASC) ,
                    INDEX `fk_Clients_has_Staff_Clients_idx` (`Clients_Case_Number` ASC) ,
                    CONSTRAINT `fk_Clients_has_Staff_Clients`
                      FOREIGN KEY (`Clients_Case_Number` )
                      REFERENCES `Alternative_Pathways`.`Clients` (`Case_Number` )
                      ON DELETE NO ACTION
                      ON UPDATE NO ACTION,
                    CONSTRAINT `fk_Clients_has_Staff_Staff1`
                      FOREIGN KEY (`Staff_Emp_ID` )
                      REFERENCES `Alternative_Pathways`.`Staff` (`Emp_ID` )
                      ON DELETE NO ACTION
                      ON UPDATE NO ACTION)
                  ENGINE = InnoDB
                  

                  SQL 腳本執行完成:語句:7 條成功,1 條失敗

                  SQL script execution finished: statements: 7 succeeded, 1 failed

                  這是父表的 SQL.

                  CREATE  TABLE IF NOT EXISTS `Alternative_Pathways`.`Clients` (
                    `Case_Number` INT NOT NULL ,
                    `First_Name` CHAR(10) NULL ,
                    `Middle_Name` CHAR(10) NULL ,
                    `Last_Name` CHAR(10) NULL ,
                    `Address` CHAR(50) NULL ,
                    `Phone_Number` INT(10) NULL ,
                    PRIMARY KEY (`Case_Number`) )
                  ENGINE = InnoDB
                  
                  CREATE  TABLE IF NOT EXISTS `Alternative_Pathways`.`Staff` (
                    `Emp_ID` INT NOT NULL ,
                    `First_Name` CHAR(10) NULL ,
                    `Middle_Name` CHAR(10) NULL ,
                    `Last_Name` CHAR(10) NULL ,
                    PRIMARY KEY (`Emp_ID`) )
                  ENGINE = InnoDB
                  

                  推薦答案

                  我猜 Clients.Case_Number 和/或 Staff.Emp_ID 并不完全相同數據類型為 Clients_has_Staff.Clients_Case_NumberClients_has_Staff.Staff_Emp_ID.

                  I'm guessing that Clients.Case_Number and/or Staff.Emp_ID are not exactly the same data type as Clients_has_Staff.Clients_Case_Number and Clients_has_Staff.Staff_Emp_ID.

                  也許父表中的列是INT UNSIGNED?

                  它們在兩個表中的數據類型必須完全相同.

                  They need to be exactly the same data type in both tables.

                  這篇關于MySQL 錯誤 1215:無法添加外鍵約束的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 數據幀讀取?)
                  1. <i id='mT7Ts'><tr id='mT7Ts'><dt id='mT7Ts'><q id='mT7Ts'><span id='mT7Ts'><b id='mT7Ts'><form id='mT7Ts'><ins id='mT7Ts'></ins><ul id='mT7Ts'></ul><sub id='mT7Ts'></sub></form><legend id='mT7Ts'></legend><bdo id='mT7Ts'><pre id='mT7Ts'><center id='mT7Ts'></center></pre></bdo></b><th id='mT7Ts'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='mT7Ts'><tfoot id='mT7Ts'></tfoot><dl id='mT7Ts'><fieldset id='mT7Ts'></fieldset></dl></div>
                      <legend id='mT7Ts'><style id='mT7Ts'><dir id='mT7Ts'><q id='mT7Ts'></q></dir></style></legend>

                          <bdo id='mT7Ts'></bdo><ul id='mT7Ts'></ul>

                              <tbody id='mT7Ts'></tbody>
                            <tfoot id='mT7Ts'></tfoot>

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

                            主站蜘蛛池模板: av黄色在线观看 | aaa一区 | 先锋影音资源网站 | 日韩中文字幕一区二区 | 天天爽夜夜爽精品视频婷婷 | 成人在线电影在线观看 | 天天干天天干 | 激情国产在线 | 国产精品视频一区二区三区四区国 | 亚洲一区欧美 | 草b视频 | 国产91视频一区二区 | 亚洲国产情侣 | www国产亚洲精品久久网站 | 日本一二三区在线观看 | 国产精品爱久久久久久久 | 国产日韩精品视频 | 久久国产一区二区三区 | 精品一二三区视频 | 日韩成人影院在线观看 | 这里只有精品999 | 欧美精品一二区 | 欧美一级www片免费观看 | 精品在线观看一区二区 | 精品综合在线 | 日韩精品一区二区三区中文字幕 | 欧美网址在线观看 | 久久久久网站 | 男女爱爱福利视频 | 久久精品欧美一区二区三区不卡 | 成人a视频| 狠狠亚洲 | 玖玖综合网 | 在线观看欧美一区 | 亚洲精品一区二区三区四区高清 | 日韩精品视频一区二区三区 | 久久精品国产久精国产 | 羞羞羞视频 | 久久综合一区 | 久操av在线 | 武道仙尊动漫在线观看 |