MySQL ERROR 1241 (21000): Operand should contain 1 column(s)
A subquery or expression returned several columns where only one is expected.
Seen on:
MySQL
Meaning
Using SELECT a, b in an IN (...) or comparison, or extra parentheses turning a list into a row constructor.
Common causes
- Subquery selecting multiple columns in IN/=
- Parenthesised column list in SELECT
⚡ Quick fix
- Select a single column in the subquery
- Use row comparisons deliberately: (a, b) IN (SELECT a, b …)
Detailed fix by platform
MySQL
SELECT * FROM orders WHERE user_id IN (SELECT id FROM users WHERE active = 1);
How to diagnose
- Subquery — How many columns?
- Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026