[英]MySQL Error 1452 Inserting Data
I am trying to insert data into a database I have designed, and am receiving an error 1452. 我试图将数据插入我设计的数据库中,并收到错误1452。
SOLVED. 解决了。
As far as the error concerned most likely you don't have rows in one or all parent tables ( Customer
, Branch
, AccountTypes
) with PK values that you're trying to refer to in your INSERT
statement ( 1
, "40-20-23"
, "Current"
accordingly). 至于与错误有关的问题,您很可能在一个或所有父表( Customer
, Branch
, AccountTypes
)中没有要在INSERT
语句中引用的PK值( 1
, "40-20-23"
,相应地为"Current"
)。
Insert these rows first 首先插入这些行
INSERT INTO Customer (FirstName, ...) VALUES(...);
INSERT INTO Branch (BranchSortCode, ...) VALUES('40-20-23', ...);
INSERT INTO AccountTypes (AccountType, ...) VALUES('Current', ...);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.