Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mysql select where not in multiple tables

SELECT inactive.id
FROM inactive
WHERE NOT EXISTS (select null from renamed where renamed.id = inactive.id)
AND NOT EXISTS (select null from returned where returned.id = inactive.id)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mysql #select #multiple #tables
ADD COMMENT
Topic
Name
1+6 =