iotdb数据库常用语句

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
iotdb 数据库常用语句
1. 创建数据库
sql CREATE DATABASE database_name;
2. 显示数据库
sql SHOW DATABASES;
3. 删除数据库
sql DROP DATABASE database_name;
4. 创建表
sql CREATE TABLE table_name (
field_name data_type [NOT NULL], field_name data_type [NOT NULL], ... );
5. 查看表 sql DESCRIBE table_name;
6. 删除表 sql DROP TABLE table_name;
7. 插入数据 sql INSERT INTO table_name (field_name, field_name, ...) VALUES (value, value, ...);
18. 索引
sql CREATE INDEX index_name ON table_name (field_name);
19. 触发器
sql CREATE TRIGGER trigger_name ON table_name FOR INSERT/UPDATE/DELETE AS
sql BEGIN
eld_name, ... FROM table_name WHERE condition;
9. 更新数据 sql
UPDATE table_name SET field_name = value, field_name = value, ... WHERE condition;
14. 时序查询
sql SELECT field_name, field_name, ... FROM table_name WHERE condition ALIGN(interval) FILL(value) INTERPOLATE;
15. 子查询
sql SELECT FROM (SELECT field_name, field_name, ... FROM table_name WHERE condition) AS subquery;
10. 删除数据 sql DELETE FROM table_name WHERE condition;
11. 聚合查询 sql SELECT aggregate_function(field_name) FROM table_name WHERE condition GROUP BY time_interval;
16. 联合查询
sql SELECT field_name, field_name, ... FROM table_name1 JOIN table_name2 ON condition;
17. 视图
sql CREATE VIEW view_name AS SELECT field_name, field_name, ... FROM table_name WHERE condition;
-- Trigger code END
20. 存储过程
sql CREATE PROCEDURE procedure_name (parameter_list) AS
sql BEGIN
-- Procedure code END
12. 连续查询 sql SELECT field_name, field_name, ... FROM table_name WHERE condition SINCE timestamp;
13. 列存查询 sql SELECT field_name, field_name, ... FROM table_name WHERE condition FILL(value) INTERPOLATE;
相关文档
最新文档