MySQL Error “Operand should contain 1 column”

2 This question already has answers here: Operand Should Contain 1 Column – MySQL NOT IN (3 answers) Closed 7 years ago.

I could find a lot of similar questions but no real solution for my problem.

My SQL query:

UPDATE ADRESSEN
SET EMAIL = 0
WHERE ID = (SELECT ID, COUNT(ID) AS COUNTER
FROM EIGENSCHAFTEN WHERE Kategorie = "BOUNCE" 
GROUP BY ID
HAVING COUNTER = 1)

The error code I receive is

#1241 - Operand should contain 1 column(s)

If I just use the query in the parentheses it works and the result is

ID | COUNTER
0002159 | 1

Where is my error? Thanks a lot for your help.

Leave a Comment