【TDengine 使用环境】测试
【TDengine 版本】3.X
【遇到的问题:数据插入问题】
CREATE STABLE thing_model_message (time TIMESTAMP, mid NCHAR(50), product_key NCHAR(50), device_name NCHAR(50), uid NCHAR(50), type NCHAR(20), identifier NCHAR(50), code INT, device_id NCHAR(50), report_time BIGINT) TAGS (data JSON)
创建表thing_model_message,插入2条tag不同,但时间相同的数据
INSERT INTO thing_model_message_json using thing_model_message tags( ‘{“temperature”: 26.5, “humidity”: 60, “status”: “ok”}’) (time, mid, product_key, device_name, uid, type, identifier,code, device_id, report_time) VALUES ( ‘2026-02-11 12:20:23’, ‘m001’, ‘pk001’, ‘deviceA’, ‘u001’, ‘telemetry’, ‘temp’, 200, ‘dev001’, 1700000000000 );
INSERT INTO thing_model_message_json using thing_model_message tags( ‘{}’) (time, mid, product_key, device_name, uid, type, identifier,code, device_id, report_time) VALUES ( ‘2026-02-11 12:20:23’, ‘m001’, ‘pk001’, ‘deviceA’, ‘u001’, ‘telemetry’, ‘temp’, 200, ‘dev001’, 1700000000000 );
执行select data from thing_model_message_json,两条数据显示相同,是什么原因?