I have two tables (receptacles, power_trails)
I’m trying to figure out a query that would only result i the receptacle_id of any recepacle_id NOT in the power_trails table?
My thinking is I only want to see the receptacles without a power trail (meaning they are available)
r937
2
SELECT whatever
FROM receptacles
WHERE NOT EXISTS
( SELECT 'whoops'
FROM powertrails
WHERE receptacle_id = receptacles.receptacle_id )
1 Like
system
Closed
4
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.