Project

General

Profile

Task #3373 » 临时表建表语句.txt

临时表建表语句 - peiming li, 05/30/2024 05:26 PM

 
1
-- ----------------------------
2
-- Table structure for iot_to_platform_temp
3
-- ----------------------------
4
DROP TABLE IF EXISTS iot_to_platform_temp;
5
CREATE TABLE iot_to_platform_temp (
6
  `commodity_name` CHAR(50)  DEFAULT NULL,
7
  `commodity_key` CHAR(50)  DEFAULT NULL,
8
  `facility_code` CHAR(50)  DEFAULT NULL,
9
  `facility_desc` CHAR(50)  DEFAULT NULL,
10
  `facility_key` CHAR(50)  DEFAULT NULL,
11
  `commodity_property_name` CHAR(50)  DEFAULT NULL,
12
  `commodity_property_code` CHAR(50)  DEFAULT NULL,
13
  `commodity_property_desc` CHAR(50)  DEFAULT NULL,
14
  `ctrl_value` int(11)  DEFAULT NULL,
15
  `desc_value` int(11)  DEFAULT NULL,
16
  `point_code` CHAR(64)  DEFAULT NULL,
17
  `point_desc` CHAR(128)  DEFAULT NULL,
18
  `point_type` int(11) DEFAULT NULL,
19
  `meas_typeid` int(11) DEFAULT NULL,
20
  `alm_prio` int(11) DEFAULT NULL,
21
  `controll_able` int(11) DEFAULT NULL,
22
  `normal_state` int(11) DEFAULT NULL
23
);
24

    
25
alter table iot_to_platform_temp add primary key (facility_key,commodity_property_code,ctrl_value,point_type);
26

    
27
grant select,insert,delete,update on iot_to_platform_temp to 'SEMASTER','SEDATUM';
    (1-1/1)