创建设备状态视图 vw_DeviceStatus
创建视图 vw_DeviceStatus as select d.DeviceID as 设备ID, d.DeviceName as 设备名称, d.DeviceType as 设备类型, d.UserID as 用户ID, ds.StatusName as 状态名称, s.SensorType as 传感器类型, s.SensorValue as 传感器数值, s.Timestamp as 时间戳 from Device d inner join DeviceStatus ds on ds.StatusID = d.DeviceID inner join SensorData s on s.DataID = d.DeviceID;
原文地址: https://www.cveoy.top/t/topic/pf5a 著作权归作者所有。请勿转载和采集!