我正在尝试使用 IF() 是 mySQL,其中结构看起来像这样:
if(
phone_number LIKE '%992%' (SELECT phone_number FROM db.phonebook WHERE country='UK'),
SELECT xxx FROM xxx WHERE xxx,
SELECT xxx FROM xxx WHERE xxx
)
我正在努力实现:
IF (if you manage to find a phone number in the 'UK' phonebook that looks like '992'),
THEN (run the following XXX query),
ELSE (run the following YYY query)
这不起作用,语法显然是错误的。不胜感激您的建议。