答案 0 :(得分:1)
我认为您只需稍微更改WHERE
子句中的语法:
SELECT
country,
account_num,
name
FROM table
WHERE
country = 'au' AND account_num <> '999' OR
country = 'ph' AND account_num <> '888' OR
country = 'br' AND account_num <> '555';
答案 1 :(得分:1)
添加了另一个条件来捕捉除了&#39;以及&#39; ph&#39;以外的其他国家/地区。或者&#39; br&#39;:
SELECT
country,
account_num,
name
FROM table
WHERE
(country = 'au' AND account_num <> '999') OR
(country = 'ph' AND account_num <> '888') OR
(country = 'br' AND account_num <> '555') OR
country not in ('au', 'ph', 'br');