gpt4 book ai didi

MySQL Workbench 1064 语法错误

转载 作者:行者123 更新时间:2023-11-29 19:42:41 26 4
gpt4 key购买 nike

MySQL Workbench 创建了这段代码,不是我。我刚刚使用了 GUI。

Operation failed: There was an error while applying the SQL script to the database.
Executing:
ALTER TABLE `isometr1_keyboard`.`records`
ADD CONSTRAINT `fk_records_layout_id`
FOREIGN KEY ()
REFERENCES `isometr1_keyboard`.`layouts` ()
ON DELETE NO ACTION
ON UPDATE NO ACTION;

ERROR 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 ')
REFERENCES `isometr1_keyboard`.`layouts` ()
ON DELETE NO ACTION
ON UPDAT' at line 3
SQL Statement:
ALTER TABLE `isometr1_keyboard`.`records`
ADD CONSTRAINT `fk_records_layout_id`
FOREIGN KEY ()
REFERENCES `isometr1_keyboard`.`layouts` ()
ON DELETE NO ACTION
ON UPDATE NO ACTION

我不明白错误在哪里。也不明白为什么 GUI 会创建有错误的代码。

我是不是搞错了?

最佳答案

列的数据类型不匹配。这导致 MySQL Workbench 创建格式不正确的代码。

关于MySQL Workbench 1064 语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41254594/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com