demo.sql 545 字节
Newer Older
H
huili 已提交
1
create database if not exists db0
F
fang 已提交
2
create table if not exists db0.tb0 (ts timestamp, voltage int, current float)
H
huili 已提交
3 4
import into db0.tb0 file demo.csv

F
fang 已提交
5

H
huili 已提交
6 7
create database if not exists db1
use db1
F
fang 已提交
8 9 10 11 12 13 14
create table if not exists tb1 (ts timestamp, temperature int, humidity float)
insert into tb1 values('2010-07-23 11:01:02.000', 37, 50.1)
insert into tb1 values(now, 36, 47.8);    
insert into tb1 values(now+1a, 38, 65.3); 
insert into tb1 values(now+1s, 38, 53.9 ); 
insert into tb1 values(now+1m, 37, 45.6); 
insert into tb1 values(now+1h, 35, 41.1);