查询单独设备编码前段
SELECT * FROM localcamera_info
WHERE indexcode='65282720001310301020';
查询单独设备名字前段
SELECT * FROM localcamera_info
WHERE name='图书馆';
查询设备名字重复前段
SELECT name,count(name) FROM localcamera_info
GROUP BY name;
查询设备为0前段
SELECT * FROM localcamera_info
WHERE longitude='0' OR latitude='0';
查询不在总表里的设备编码前段
SELECT indexcode,name FROM localcamera_info
WHERE indexcode NOT IN (SELECT indexcode FROM camerashare_info);
自定义查询设备所属IP地址是多少
SELECT c.name,c.indexcode,d.networkaddr
FROM localcamera_info c
LEFT JOIN localdevice_info d ON c.deviceid=d.deviceid;