#1241-operand should contain one column (s)

Source: Internet
Author: User
#1241-operand should contain 1 column (s)
SELECT O. * , (
From Purn_order_product as Op
WHERE Op.op_oordernum = O.o_num
) as OP_CNT, (

From Purn_order_product as Op
INNER JOIN purn_product as P on (p.p_it = Op.op_pcode)
WHERE Op.op_oordernum = O.o_num
ORDER by Op.op_uid ASC
) as P_info
From Purn_order as O
ORDER by O_rdate DESC
LIMIT 0, 50

Excuse me,
The above SQL statement prompts an error:
#1241-operand should contain 1 column (s)
How does this work?
Please give me some details.
Thank you
------to solve the idea----------------------
(SELECT count (*) from Purn_order_product as op WHERE op.op_oordernum = o.o_num) As OP_CNT,
(SELECT *From Purn_order_product as op INNER joins purn_product as P on (p.p_it = Op.op_pcode)
WHERE p.op_oordernum = O.o_num ORDER by op.op_uid ASC LIMIT 1) As P_info
From Purn_order as O
ORDER by O_rdate DESC
LIMIT 0, 50

There's a problem with the set broken place!
You can't assign multiple fields to an alias, which logically doesn't make sense.
That one *Should, and can only be a definite column name
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.