gpt4 book ai didi

mysql过程语法错误

转载 作者:行者123 更新时间:2023-11-29 00:41:21 25 4
gpt4 key购买 nike

我的第一个 MySQL 程序有问题。我找不到语法错误。这是程序的主体:

DECLARE TerminId INT;

INSERT INTO `Termin` (`Beginn`, `Ende`, `Titel`, `Ganztaegig`, `Serie`,
`Bemerkung`, `Tooltip`, `Ort`, `Gruppe`, `UserId`)
VALUES (BeginnPara, EndePara, TitelPara, GanztaegigPara, SeriePara,
BemerkungPara, TooltipPara, OrtPara, GruppePara, UserIdPara);

SET TerminId = ( SELECT Distinct Id FROM Termin
where Beginn = BeginnPara
and Ende = EndePara
and UserId = UserIdPara);

最佳答案

删除简单的引用

  DECLARE TerminId INT;

INSERT INTO Termin(Beginn, Ende, Titel, Ganztaegig, Serie, Bemerkung, Tooltip, Ort, Gruppe, UserId) VALUES (BeginnPara, EndePara, TitelPara, GanztaegigPara, SeriePara, BemerkungPara, TooltipPara, OrtPara, GruppePara, UserIdPara);

SET TerminId= (SELECT Distinct Id FROM Termin where Beginn = BeginnPara and Ende = EndePara and UserId = UserIdPara having row_number <= 1);

关于mysql过程语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12133124/

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