当多个唯一键时是否可以有一个或选项?
例如我要检查这个键或这个键,如果一个人踢出一个重复的错误然后更新那个键?
我有 2 个唯一键:UPN 和(用户名,学校)
我们在 out MYSQL 中使用了 on duplicate update 语句。如果通过了 UPN,则在重复或插入新行时更新 upn 键。我想检查 UPN 和(用户名、学校)并执行以下操作:
If upn match update on that if (username,school) match update on that if upn dosnt match but (username,school) do update on (username,school) match If upn match and (username,school) dosnt update on UPN match
所以我需要它来使用 or 代替 and,这可能吗?
灰