0

this is my sql query

delete FROM 
SubMaster_test1 
where SubMasterId in (select * 
from SubMaster_test1 where AgentId 
not in (select distinct
introducer from SubMaster_test1 
where introducer is not null))

i'm getting following error

[Err] 1241 - Operand should contain 1 column(s)

  • Possible duplicate of [MySQL - Operand should contain 1 column(s)](http://stackoverflow.com/questions/14046838/mysql-operand-should-contain-1-columns) –  Jan 11 '17 at 08:46

1 Answers1

0

you should wright only "id" on "*"

delete FROM 
    SubMaster_test1 
    where SubMasterId in (select SubMasterId
    from SubMaster_test1 where AgentId 
    not in (select distinct
    introducer from SubMaster_test1 
    where introducer is not null))
krishn Patel
  • 2,579
  • 1
  • 19
  • 30