I have 3 tables Tag, Software and Software_Tag which make many-to-many relationship between two first.
I wish to split the subquery out on two parts (because i can not do in in one in mysql):
(SELECT softwares_id FROM Software_Tag GROUP BY softwares_id HAVING COUNT(*) >=2) as my
DELETE FROM Software_Tag WHERE tags_id=1 AND softwares_id IN (my)
Here i try use virtual table named ‘my’ to put it to second query.
How could i do it?
now it gets en exception like check your sql server.
—
You could just do it as:
This should work in MySQL.
Edit .. try this