Skip to content
Advertisement

#1241 – Operand should contain 1 column(s) In wamp on phpmyadmin

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.

Advertisement

Answer

Try This,

SELECT *,
    (SELECT `supplier_sign_up_id` FROM suppliers_acc WHERE singup_login_id = 138 LIMIT 1) as supplier_sign_up_id ,
    (SELECT `email_address` FROM supplier_sign_up  WHERE supplier_sign_up_id = 42 LIMIT 1 ) as email_address
FROM
   `singup_login` 
WHERE
   1;
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement