燕山石化溯源三维电子沙盘-【后端】-服务
13693261870
2023-12-18 0d2d37f11b0804d71395582b9bb2d589cfe9003d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
----------------------------------------------------------------------
use yssh;
show tables;
 
SHOW BINARY LOGS;
RESET MASTER;
----------------------------------------------------------------------
create table voc_vals (
    id bigint not null primary key comment '主键',
    x int comment 'X',
    y int comment 'Y',
    val double(25, 10) comment '值',
    create_time datetime comment '值'
);
create index voc_vals_val on voc_vals (val);
create index voc_vals_time on voc_vals (create_time);
----------------------------------------------------------------------
create table voc_addr (
    id int not null auto_increment primary key comment '主键',
    x int comment 'X',
    y int comment 'Y',
    addr varchar(50) comment '地址'
);
----------------------------------------------------------------------
select a.*, date_format(create_time, '%Y%m%d%H') "time" from voc_vals a where date_format(create_time, '%Y%m%d%H') = '2023060514';
select * from voc_vals where create_time < date_sub(now(), interval 1 year);
 
select * from voc_vals;
select * from voc_addr;