I think there are 2 tables (it has more fields but this should not make any difference):
table 'container'; INT ID; VARCHAR (20) name; VARCHAR (20) UID; Table 'sync'; INT ID; VARCHAR (20) containerUID; VARCHAR (20) DeviceUID;
Now I need all the containers, which do not have an entry in the 'sync' table for a specific device's UID. I tried it this way, but the results do not look right.
SELECT * FROM (SELECT COUNT. *, (B) B WHERE a.uid = b Container UID and B. DeviceIIDUI = 'DEVICEUID') from synchronization as ASK to ANSALSINC container A) ASANS ANSLCNC = 0
As I want to do it in mysql, because there are too many entries in the container-table. So I do not try to take them back as a result, but first I filter them.
Use does not exist
:
Choose from containers * C where is not present (select 1 from sink where s.containerUid = c.id and s.deviceUid = 'DEVICEUID')
Comments
Post a Comment