Nested query in Sql.
SELECT
*,
(SELECT `supplier_sign_up_id`,
(
SELECT
email_address
FROM
supplier_sign_up
WHERE
supplier_sign_up_id = 42 LIMIT 1
)
FROM
`suppliers_acc`
WHERE
singup_login_id = 138 LIMIT 1
)
FROM
`singup_login`
WHERE
1;
It’s give error-
Operand should contain 1 column(s).
How to resolve it.
2
Answers
Perhaps this does what you want:
I’m not sure why you are trying to return
supplier_sign_up_id
from the subquery. You know the value is 42. I suspect you just wantemail_address
.Try This,