gpt4 book ai didi

mysql - 为什么 IF..NOT IN(subquery) THEN 不能与 MySQL 一起使用?

转载 作者:行者123 更新时间:2023-11-30 00:33:10 27 4
gpt4 key购买 nike

每次我调用这个过程时,它都不会执行任何操作,显然我的 if 语句有问题,但我只是无法弄清楚是什么,或者为什么这样做,我习惯了 MS Server,但我'我现在正在用 mysql 做一些事情,请帮助我,我将非常感激:)

If Id_Session not in(Select Id_Session From Reps ) then

Insert Into reps ( Id_Session,
Id_Rep ,
Rep_name,
Rep_Start_Time,
Rep_End_Time,
Rep_Country,
VisitorGroupA,
VisitorGroupB,
Interactive,
Qualified,
Skill)

Values ( Id_Session,
Id_Rep ,
Rep_name,
Rep_Start_Time,
Rep_End_Time,
Rep_Country,
VisitorGroupA,
VisitorGroupB,
Interactive,
Qualified,
Skill);

End If;

最佳答案

!找到了我的问题的答案,我所要做的就是将Id_Session参数名称更改为pId_Session,显然mysql不支持这个,谢谢!

关于mysql - 为什么 IF..NOT IN(subquery) THEN 不能与 MySQL 一起使用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22366019/

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