MySQL Forums
Forum List  »  Newbie

Re: Delete in IF or CASE function
Posted by: Vemsom Helst
Date: June 29, 2017 08:07AM

Still missing that edit button here...

I saw my error in the subquery, I selected three columns. I do however get 'subquery return more than 1 row'

delete from tab
where SIGNAL_ID=0 and SIGNAL_ID=(
SELECT a.SIGNAL_ID
FROM (select * from tab) a
INNER JOIN (select * from tab) b ON a.orders = b.orders
WHERE a.SIGNAL_ID <> b.SIGNAL_ID);

Options: ReplyQuote


Subject
Written By
Posted
Re: Delete in IF or CASE function
June 29, 2017 08:07AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.