Arjun Panwar

Arjun Panwar

  • NA
  • 10.6k
  • 5.9m

Subquery returns more than 1 row

Mar 15 2012 1:24 AM
Hi,

I have a mysql query to fetch a number of id's(studentID), which as given below:

select t1.studentID from remittedfees t1 where (select t2.fees from feesasigned t2 where t2.studentID=t1.studentID)=(select sum(t3.remittedAmt) from remittedfees t3 where t3.studentID=t1.studentID);

but the query returns the following error

ERROR 1242 (21000): Subquery returns more than 1 row.


Thanks


Answers (4)