text stringlengths 6 9.38M |
|---|
insert into CMDS_M_BODY_PART values('001','頭頸部');
insert into CMDS_M_BODY_PART values('002','胸部');
insert into CMDS_M_BODY_PART values('003','腹部');
insert into CMDS_M_BODY_PART values('004','呼吸器');
insert into CMDS_M_BODY_PART values('005','消化器');
insert into CMDS_M_BODY_PART values('006','循環器');
insert into CMDS_M_BODY_PART values('007','気管食道');
insert into CMDS_M_BODY_PART values('008','肛門');
insert into CMDS_M_BODY_PART values('009','血管');
insert into CMDS_M_BODY_PART values('010','心臓血管');
insert into CMDS_M_BODY_PART values('011','腎臓');
insert into CMDS_M_BODY_PART values('012','脳神経');
insert into CMDS_M_BODY_PART values('013','神経');
insert into CMDS_M_BODY_PART values('014','血液');
insert into CMDS_M_BODY_PART values('015','乳腺');
insert into CMDS_M_BODY_PART values('016','内分泌');
insert into CMDS_M_BODY_PART values('017','代謝');
insert into CMDS_M_BODY_PART values('018','頭部');
insert into CMDS_M_BODY_PART values('019','頸部');
insert into CMDS_M_BODY_PART values('020','気管');
insert into CMDS_M_BODY_PART values('021','気管支');
insert into CMDS_M_BODY_PART values('022','肺');
insert into CMDS_M_BODY_PART values('023','食道');
insert into CMDS_M_BODY_PART values('024','胃腸');
insert into CMDS_M_BODY_PART values('025','十二指腸');
insert into CMDS_M_BODY_PART values('026','小腸');
insert into CMDS_M_BODY_PART values('027','大腸');
insert into CMDS_M_BODY_PART values('028','肝臓');
insert into CMDS_M_BODY_PART values('029','胆のう');
insert into CMDS_M_BODY_PART values('030','膵臓');
insert into CMDS_M_BODY_PART values('031','心臓');
insert into CMDS_M_BODY_PART values('032','脳');
insert into CMDS_M_BODY_PART values('033','脂質代謝');
commit;
|
create table ACT_ID_PROPERTY (
NAME_ varchar(64),
VALUE_ varchar(300),
REV_ integer,
primary key (NAME_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
insert into ACT_ID_PROPERTY
values ('schema.version', '6.0.0.0', 1);
create table ACT_ID_BYTEARRAY (
ID_ varchar(64),
REV_ integer,
NAME_ varchar(255),
BYTES_ LONGBLOB,
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
create table ACT_ID_TOKEN (
ID_ varchar(64) not null,
REV_ integer,
TOKEN_VALUE_ varchar(255),
TOKEN_DATE_ timestamp(3),
IP_ADDRESS_ varchar(255),
USER_AGENT_ varchar(255),
USER_ID_ varchar(255),
TOKEN_DATA_ varchar(2000),
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
create table ACT_ID_PRIV (
ID_ varchar(64) not null,
NAME_ varchar(255),
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
create table ACT_ID_PRIV_MAPPING (
ID_ varchar(64) not null,
PRIV_ID_ varchar(64) not null,
USER_ID_ varchar(255),
GROUP_ID_ varchar(255),
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
alter table ACT_ID_PRIV_MAPPING
add constraint ACT_FK_PRIV_MAPPING
foreign key (PRIV_ID_)
references ACT_ID_PRIV (ID_);
create index ACT_IDX_PRIV_USER on ACT_ID_PRIV_MAPPING(USER_ID_);
create index ACT_IDX_PRIV_GROUP on ACT_ID_PRIV_MAPPING(GROUP_ID_);
|
-- 35
select tenant_name from tenant where tenant_dob = (select min(tenant_dob) from tenant); |
rem
rem
Rem Copyright (c) 1996 by Oracle Corporation. All rights reserved.
Rem NAME
Rem privsec.sql
Rem DESCRIPTION
Rem This file contains one package:
Rem owa_sec - Utitility procedures/functions to provide security
Rem to procedures accessed via the PL/SQL Agent.
Rem
Rem NOTES
Rem
Rem MODIFIED (MM/DD/YY)
Rem rpang 06/29/96 - Creation
Rem
create or replace package body OWA_SEC is
/*******************************************************************/
/* Procedure to specify the PL/SQL Agent's authorization scheme */
/*******************************************************************/
procedure set_authorization(scheme in integer) is
begin
owa.auth_scheme := scheme;
end;
/*******************************************************************/
/* Functions to obtain the Web client's authentication information */
/*******************************************************************/
function get_user_id return varchar2 is
begin
return owa.user_id;
end;
function get_password return varchar2 is
begin
return owa.password;
end;
function get_client_ip return owa_util.ip_address is
begin
return owa.ip_address;
end;
function get_client_hostname return varchar2 is
begin
return owa.hostname;
end;
/*******************************************************************/
/* Procedure to specify the dynamic page's protection realm */
/*******************************************************************/
procedure set_protection_realm(realm in varchar2) is
begin
owa.protection_realm := realm;
end;
end;
/
show errors
|
##
# Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U.
# This file is part of openmano
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# For those usages not covered by the Apache License, Version 2.0 please
# contact with: nfvlabs@tid.es
##
/*
This table contains the matching between dataplane host ports
and openflow switch ports.
The two first column identifies the host and the pci bus
Last column identifies the switch port name
command ethtool -i provides the pci bus port
command ethtool -p makes this port blinking
finally openvim prints at starting the openflow ports naming
NOTE: if a host has already been inserted, you must execute
UpdateSwitchPort database procedure to associate ports with
the switch connection
*/
LOCK TABLES `of_ports_pci_correspondence` WRITE;
/*
INSERT INTO `of_ports_pci_correspondence`
(ip_name, pci, switch_port)
VALUES
('nfv102.hi.inet', '0000:44:00.1', 'Te0/8'),
('nfv102.hi.inet', '0000:44:00.0', 'Te0/9'),
('nfv102.hi.inet', '0000:43:00.1', 'Te0/10'),
('nfv102.hi.inet', '0000:43:00.0', 'Te0/11'),
('nfv102.hi.inet', '0000:04:00.0', 'Te0/12'),
('nfv102.hi.inet', '0000:04:00.1', 'Te0/13'),
('nfv102.hi.inet', '0000:06:00.0', 'Te0/14'),
('nfv102.hi.inet', '0000:06:00.1', 'Te0/15'),
('nfv103.hi.inet', '0000:44:00.1', 'Te0/16'),
('nfv103.hi.inet', '0000:44:00.0', 'Te0/17'),
('nfv103.hi.inet', '0000:43:00.1', 'Te0/18'),
('nfv103.hi.inet', '0000:43:00.0', 'Te0/19'),
('nfv103.hi.inet', '0000:04:00.0', 'Te0/20'),
('nfv103.hi.inet', '0000:04:00.1', 'Te0/21'),
('nfv103.hi.inet', '0000:06:00.0', 'Te0/22'),
('nfv103.hi.inet', '0000:06:00.1', 'Te0/23'),
('nfv101.hi.inet', '0000:44:00.1', 'Te0/0'),
('nfv101.hi.inet', '0000:44:00.0', 'Te0/1'),
('nfv101.hi.inet', '0000:43:00.1', 'Te0/2'),
('nfv101.hi.inet', '0000:43:00.0', 'Te0/3'),
('nfv101.hi.inet', '0000:04:00.0', 'Te0/4'),
('nfv101.hi.inet', '0000:04:00.1', 'Te0/5'),
('nfv101.hi.inet', '0000:06:00.0', 'Te0/6'),
('nfv101.hi.inet', '0000:06:00.1', 'Te0/7'),
('nfv100.hi.inet', '0000:06:00.0', 'Te0/33'),
('nfv100.hi.inet', '0000:06:00.1', 'Te0/32'),
('nfv100.hi.inet', '0000:08:00.0', 'Te0/35'),
('nfv100.hi.inet', '0000:08:00.1', 'Te0/34'),
('nfv104.hi.inet', '0000:44:00.0', 'Te0/25'),
('nfv104.hi.inet', '0000:44:00.1', 'Te0/24'),
('nfv104.hi.inet', '0000:04:00.0', 'Te0/28'),
('nfv104.hi.inet', '0000:04:00.1', 'Te0/29'),
('nfv104.hi.inet', '0000:43:00.0', 'Te0/27'),
('nfv104.hi.inet', '0000:43:00.1', 'Te0/26'),
('nfv104.hi.inet', '0000:06:00.0', 'Te0/30'),
('nfv104.hi.inet', '0000:06:00.1', 'Te0/31'),
( '10.95.87.139', '0000:03:00.0', 'eth2/5'),
( '10.95.87.139', '0000:03:00.1', 'eth2/6'),
( '10.95.87.139', '0000:04:00.1', 'eth2/7'),
( '10.95.87.139', '0000:41:00.0', 'eth2/1'),
( '10.95.87.139', '0000:41:00.1', 'eth2/2'),
( '10.95.87.139', '0000:42:00.0', 'eth2/3'),
( '10.95.87.139', '0000:42:00.1', 'eth2/4'),
( '10.95.87.138', '0000:04:00.1', 'eth1/5'),
( '10.95.87.138', '0000:04:00.0', 'eth1/6'),
( '10.95.87.138', '0000:05:00.1', 'eth1/7'),
( '10.95.87.138', '0000:43:00.0', 'eth1/3'),
( '10.95.87.138', '0000:43:00.1', 'eth1/4'),
( '10.95.87.138', '0000:44:00.1', 'eth1/2'),
( '10.95.87.138', '0000:44:00.0', 'eth1/1'),
( '10.95.87.133', '0000:84:00.1', 'spp0-1'),
( '10.95.87.133', '0000:84:00.0', 'spp0-2'),
( '10.95.87.133', '0000:82:00.1', 'spp0-3'),
( '10.95.87.133', '0000:82:00.0', 'spp0-4'),
( '10.95.87.133', '0000:0a:00.1', 'spp0-5'),
( '10.95.87.133', '0000:0a:00.0', 'spp0-6'),
( '10.95.87.133', '0000:08:00.1', 'spp0-7'),
( '10.95.87.133', '0000:08:00.0', 'spp0-8'),
( '10.95.87.134', '0000:84:00.1', 'spp0-9'),
( '10.95.87.134', '0000:84:00.0', 'spp0-10'),
( '10.95.87.134', '0000:82:00.1', 'spp0-11'),
( '10.95.87.134', '0000:82:00.0', 'spp0-12'),
( '10.95.87.134', '0000:0a:00.1', 'spp0-13'),
( '10.95.87.134', '0000:0a:00.0', 'spp0-14'),
( '10.95.87.134', '0000:08:00.1', 'spp0-15'),
( '10.95.87.134', '0000:08:00.0', 'spp0-16'),
( '10.95.87.181', '0000:84:00.1', 'spp0-17'),
( '10.95.87.181', '0000:84:00.0', 'spp0-18'),
( '10.95.87.181', '0000:82:00.1', 'spp0-19'),
( '10.95.87.181', '0000:82:00.0', 'spp0-20'),
( '10.95.87.181', '0000:0a:00.1', 'spp0-21'),
( '10.95.87.181', '0000:0a:00.0', 'spp0-22'),
( '10.95.87.181', '0000:08:00.1', 'spp0-23'),
( '10.95.87.181', '0000:08:00.0', 'spp0-24'),
( '10.95.87.186', '0000:84:00.1', 'spp0-25'),
( '10.95.87.186', '0000:84:00.0', 'spp0-26'),
( '10.95.87.186', '0000:82:00.1', 'spp0-27'),
( '10.95.87.186', '0000:82:00.0', 'spp0-28'),
( '10.95.87.186', '0000:0a:00.1', 'spp0-29'),
( '10.95.87.186', '0000:0a:00.0', 'spp0-30'),
( '10.95.87.186', '0000:08:00.1', 'spp0-31'),
( '10.95.87.186', '0000:08:00.0', 'spp0-32')
;
*/
UNLOCK TABLES;
|
CREATE TABLE tab_dept
(
DEPT_ID INT NOT NULL AUTO_INCREMENT,
DEPT_NAME VARCHAR(100) NOT NULL,
PRIMARY KEY(DEPT_ID)
);
CREATE TABLE tab_emp
(
EMP_ID INT NOT NULL AUTO_INCREMENT,
EMP_NAME VARCHAR(100) NOT NULL,
GENDER CHAR(1) NOT NULL,
EMAIL VARCHAR(50) NOT NULL,
DEPT_ID INT NOT NULL,
PRIMARY KEY(EMP_ID),
CONSTRAINT FK_EMP_DEPT FOREIGN KEY(DEPT_ID)
REFERENCES tab_dept(DEPT_ID)
);
INSERT INTO `tab_dept` VALUES (1, '客户服务处');
INSERT INTO `tab_dept` VALUES (2, '人力资源处');
INSERT INTO `tab_dept` VALUES (3, '资材处');
INSERT INTO `tab_dept` VALUES (4, '研发处');
INSERT INTO `tab_dept` VALUES (5, '制造处');
INSERT INTO `tab_dept` VALUES (6, '全球客户支援处');
INSERT INTO `tab_dept` VALUES (7, '总办');
INSERT INTO `tab_dept` VALUES (8, '资金处');
INSERT INTO `tab_dept` VALUES (9, '内审部');
INSERT INTO `tab_dept` VALUES (10, '会计处');
INSERT INTO `tab_dept` VALUES (11, '资讯管理部');
INSERT INTO `tab_emp` VALUES (1, 'd87014', 'F', 'd87014@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (2, '588ec5', 'M', '588ec5@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (3, '44ad86', 'F', '44ad86@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (5, '31bb64', 'M', '31bb64@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (7, 'b829c6', 'F', 'b829c6@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (8, '82cdd7', 'M', '82cdd7@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (9, '5640d8', 'F', '5640d8@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (10, 'ddd049', 'M', 'ddd049@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (11, 'b744b10', 'M', 'b744b10@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (12, '6906311', 'M', '6906311@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (13, '2592112', 'F', '2592112@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (14, 'a240413', 'M', 'a240413@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (15, '64e4314', 'F', '64e4314@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (16, '685a715', 'F', '685a715@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (17, '594c416', 'F', '594c416@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (18, '457ed17', 'M', '457ed17@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (19, 'e531d18', 'M', 'e531d18@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (20, '9917c19', 'F', '9917c19@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (21, 'd6d6320', 'M', 'd6d6320@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (22, '84a7121', 'F', '84a7121@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (23, 'f536622', 'F', 'f536622@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (24, 'a97d923', 'M', 'a97d923@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (25, 'f848124', 'M', 'f848124@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (26, 'cad5a25', 'F', 'cad5a25@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (27, 'b976226', 'F', 'b976226@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (28, '2242727', 'F', '2242727@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (29, '28bf828', 'M', '28bf828@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (30, '86a8b29', 'F', '86a8b29@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (31, 'bf7a830', 'M', 'bf7a830@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (32, 'a020a31', 'F', 'a020a31@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (33, 'c430032', 'M', 'c430032@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (34, '1c48433', 'F', '1c48433@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (35, '8a0b034', 'F', '8a0b034@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (36, '77f2f35', 'F', '77f2f35@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (37, '0e79a36', 'M', '0e79a36@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (38, '6e9b037', 'M', '6e9b037@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (39, '54f5138', 'M', '54f5138@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (40, '2eeed39', 'M', '2eeed39@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (41, 'c821a40', 'M', 'c821a40@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (42, 'ff0d641', 'M', 'ff0d641@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (43, 'ee9e442', 'M', 'ee9e442@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (44, '0efd543', 'F', '0efd543@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (45, '18c3444', 'M', '18c3444@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (46, '2091645', 'M', '2091645@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (47, 'e3cbf46', 'M', 'e3cbf46@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (48, '6f29047', 'M', '6f29047@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (49, 'd548248', 'M', 'd548248@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (50, '07ce049', 'M', '07ce049@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (51, '9622c50', 'F', '9622c50@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (52, '5fdea51', 'F', '5fdea51@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (53, '2b23c52', 'M', '2b23c52@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (54, 'e251d53', 'M', 'e251d53@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (55, 'e346e54', 'M', 'e346e54@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (56, '7e24b55', 'F', '7e24b55@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (57, '767e956', 'F', '767e956@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (58, '1bd6057', 'M', '1bd6057@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (59, 'e442e58', 'F', 'e442e58@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (60, 'bcd6559', 'M', 'bcd6559@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (61, '1901960', 'F', '1901960@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (62, 'c666a61', 'F', 'c666a61@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (63, 'd15cf62', 'F', 'd15cf62@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (64, '47d3d63', 'F', '47d3d63@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (65, 'cd74964', 'M', 'cd74964@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (66, '0337a65', 'F', '0337a65@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (67, '03ca366', 'M', '03ca366@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (68, 'db42267', 'M', 'db42267@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (69, '0d01568', 'F', '0d01568@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (70, '4ad3869', 'F', '4ad3869@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (71, 'dfbea70', 'F', 'dfbea70@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (72, '6790271', 'F', '6790271@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (73, '9cff572', 'F', '9cff572@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (74, 'e6dac73', 'M', 'e6dac73@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (75, '4642a74', 'M', '4642a74@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (76, '02eb375', 'M', '02eb375@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (77, 'd735c76', 'F', 'd735c76@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (78, '6920877', 'F', '6920877@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (79, '671d578', 'F', '671d578@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (80, '09b4c79', 'F', '09b4c79@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (81, '3663080', 'M', '3663080@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (82, '4f92f81', 'M', '4f92f81@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (83, '1517882', 'F', '1517882@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (84, 'dda0d83', 'F', 'dda0d83@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (85, 'f56c484', 'F', 'f56c484@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (86, '81c3c85', 'F', '81c3c85@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (87, 'd304b86', 'M', 'd304b86@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (88, '9f3e787', 'M', '9f3e787@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (89, '945eb88', 'F', '945eb88@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (90, '5087689', 'M', '5087689@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (91, '722a290', 'M', '722a290@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (92, '1654191', 'M', '1654191@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (93, '8909192', 'M', '8909192@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (94, '8795193', 'F', '8795193@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (95, '3c10194', 'M', '3c10194@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (96, '3e41895', 'M', '3e41895@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (97, '134be96', 'M', '134be96@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (98, 'e534d97', 'F', 'e534d97@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (99, '86d5a98', 'F', '86d5a98@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (100, 'fe2fe99', 'M', 'fe2fe99@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (101, '96ec3100', 'M', '96ec3100@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (102, '86dd5101', 'F', '86dd5101@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (103, '815c5102', 'M', '815c5102@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (104, '715c5103', 'M', '715c5103@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (105, 'a59fb104', 'M', 'a59fb104@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (106, '49739105', 'F', '49739105@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (107, '76138106', 'F', '76138106@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (108, 'bdf30107', 'M', 'bdf30107@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (109, '8611f108', 'F', '8611f108@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (110, '5af8a109', 'F', '5af8a109@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (111, '13e30110', 'F', '13e30110@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (112, '542fa111', 'F', '542fa111@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (113, '2e4d1112', 'M', '2e4d1112@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (114, '2d04d113', 'M', '2d04d113@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (115, 'e00cd114', 'M', 'e00cd114@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (116, 'a8999115', 'F', 'a8999115@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (117, '26125116', 'M', '26125116@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (118, '8ae03117', 'F', '8ae03117@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (119, '3c14d118', 'F', '3c14d118@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (120, '37d2a119', 'M', '37d2a119@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (121, '06695120', 'M', '06695120@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (122, 'f0c21121', 'M', 'f0c21121@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (123, '6ff99122', 'F', '6ff99122@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (124, '2969c123', 'M', '2969c123@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (125, 'e3d01124', 'F', 'e3d01124@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (126, '3ced5125', 'M', '3ced5125@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (127, '89d77126', 'M', '89d77126@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (128, 'd052c127', 'M', 'd052c127@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (129, '022b6128', 'F', '022b6128@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (130, 'd3ba8129', 'M', 'd3ba8129@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (131, '792bf130', 'M', '792bf130@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (132, 'a7054131', 'M', 'a7054131@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (133, 'de4a1132', 'M', 'de4a1132@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (134, 'd8eaf133', 'M', 'd8eaf133@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (135, 'd1bad134', 'F', 'd1bad134@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (136, '2a7c2135', 'M', '2a7c2135@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (137, '1e7b3136', 'M', '1e7b3136@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (138, '61d5c137', 'F', '61d5c137@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (139, 'b5164138', 'M', 'b5164138@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (140, 'ef081139', 'F', 'ef081139@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (141, 'a2e21140', 'M', 'a2e21140@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (142, '0db9e141', 'M', '0db9e141@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (143, '61356142', 'F', '61356142@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (144, '386c1143', 'F', '386c1143@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (145, 'a3dd3144', 'F', 'a3dd3144@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (146, 'e71b1145', 'F', 'e71b1145@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (147, 'b5170146', 'F', 'b5170146@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (148, '04605147', 'F', '04605147@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (149, '8b89f148', 'M', '8b89f148@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (150, 'd98f4149', 'M', 'd98f4149@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (151, '8abaf150', 'M', '8abaf150@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (152, 'f0b9c151', 'M', 'f0b9c151@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (153, 'b73d2152', 'M', 'b73d2152@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (154, '5d870153', 'F', '5d870153@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (155, 'a988b154', 'M', 'a988b154@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (156, 'a7c86155', 'F', 'a7c86155@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (157, 'a3de3156', 'M', 'a3de3156@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (158, '13652157', 'F', '13652157@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (159, 'c6849158', 'F', 'c6849158@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (160, 'e8f7a159', 'F', 'e8f7a159@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (161, '9d688160', 'F', '9d688160@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (162, '1f49a161', 'F', '1f49a161@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (163, 'd75ca162', 'M', 'd75ca162@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (164, '2f0ef163', 'M', '2f0ef163@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (165, 'cb642164', 'F', 'cb642164@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (166, '85064165', 'F', '85064165@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (167, '4c668166', 'F', '4c668166@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (168, '2b3b6167', 'M', '2b3b6167@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (169, '4ff64168', 'M', '4ff64168@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (170, '8eb0e169', 'F', '8eb0e169@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (171, '6dd76170', 'F', '6dd76170@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (172, '7cd7d171', 'F', '7cd7d171@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (173, '68bb2172', 'M', '68bb2172@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (174, '97608173', 'M', '97608173@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (175, '041f3174', 'M', '041f3174@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (176, 'ff679175', 'F', 'ff679175@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (177, '94d83176', 'F', '94d83176@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (178, '615e6177', 'M', '615e6177@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (179, '1c4f2178', 'F', '1c4f2178@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (180, '127f4179', 'M', '127f4179@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (181, '5582d180', 'F', '5582d180@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (182, 'f780f181', 'F', 'f780f181@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (183, '437b6182', 'M', '437b6182@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (184, '24908183', 'M', '24908183@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (185, '1e752184', 'F', '1e752184@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (186, '49c5b185', 'F', '49c5b185@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (187, '6fba2186', 'F', '6fba2186@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (188, '42c40187', 'F', '42c40187@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (189, 'b2023188', 'F', 'b2023188@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (190, '0d99d189', 'M', '0d99d189@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (191, 'a27f5190', 'F', 'a27f5190@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (192, '17fb0191', 'F', '17fb0191@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (193, '2c7b0192', 'F', '2c7b0192@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (194, 'd3eee193', 'F', 'd3eee193@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (195, '6a83d194', 'F', '6a83d194@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (196, 'c8df2195', 'F', 'c8df2195@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (197, '78dd0196', 'M', '78dd0196@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (198, 'dee43197', 'M', 'dee43197@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (199, '609c0198', 'M', '609c0198@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (200, 'cdde3199', 'M', 'cdde3199@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (201, 'd06f5200', 'M', 'd06f5200@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (202, 'ea4da201', 'F', 'ea4da201@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (203, 'c926f202', 'F', 'c926f202@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (204, 'feff1203', 'F', 'feff1203@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (205, 'b1cce204', 'M', 'b1cce204@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (206, 'eaaf5205', 'M', 'eaaf5205@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (207, '03558206', 'F', '03558206@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (208, '8a736207', 'F', '8a736207@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (209, 'cd7ac208', 'M', 'cd7ac208@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (210, '28734209', 'M', '28734209@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (211, '094f3210', 'M', '094f3210@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (212, 'f9199211', 'F', 'f9199211@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (213, 'c1104212', 'M', 'c1104212@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (214, '96ffe213', 'F', '96ffe213@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (215, 'bbfa5214', 'F', 'bbfa5214@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (216, '7ab7e215', 'M', '7ab7e215@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (217, '940df216', 'F', '940df216@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (218, 'a946c217', 'M', 'a946c217@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (219, 'd967c218', 'M', 'd967c218@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (220, '37508219', 'M', '37508219@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (221, 'b6070220', 'F', 'b6070220@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (222, '26df5221', 'M', '26df5221@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (223, '2027c222', 'F', '2027c222@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (224, 'd8e14223', 'F', 'd8e14223@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (225, '91a34224', 'F', '91a34224@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (226, '26d94225', 'M', '26d94225@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (227, 'c8f4f226', 'M', 'c8f4f226@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (228, 'bc122227', 'M', 'bc122227@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (229, '1ffa3228', 'F', '1ffa3228@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (230, '3dbe5229', 'M', '3dbe5229@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (231, '1d3e6230', 'F', '1d3e6230@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (232, '9af2a231', 'M', '9af2a231@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (233, 'c6214232', 'M', 'c6214232@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (234, 'd7b64233', 'M', 'd7b64233@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (235, 'f9123234', 'F', 'f9123234@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (236, '8c66c235', 'F', '8c66c235@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (237, '06a36236', 'F', '06a36236@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (238, '75a65237', 'F', '75a65237@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (239, '7a2e1238', 'F', '7a2e1238@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (240, '7fea5239', 'F', '7fea5239@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (241, '59c95240', 'F', '59c95240@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (242, 'f1f35241', 'F', 'f1f35241@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (243, '4658b242', 'F', '4658b242@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (244, '5226e243', 'M', '5226e243@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (245, '882b5244', 'M', '882b5244@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (246, '9425e245', 'M', '9425e245@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (247, '4f6b0246', 'M', '4f6b0246@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (248, '87f81247', 'F', '87f81247@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (249, '86d59248', 'F', '86d59248@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (250, 'd5aaa249', 'M', 'd5aaa249@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (251, 'b85df250', 'F', 'b85df250@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (252, '73a6e251', 'M', '73a6e251@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (253, '65a68252', 'F', '65a68252@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (254, '01a3b253', 'F', '01a3b253@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (255, '37109254', 'F', '37109254@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (256, 'ad128255', 'M', 'ad128255@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (257, 'b13de256', 'F', 'b13de256@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (258, '7081f257', 'M', '7081f257@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (259, '987f3258', 'F', '987f3258@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (260, '3b5a7259', 'M', '3b5a7259@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (261, 'f1edf260', 'F', 'f1edf260@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (262, '7bff8261', 'M', '7bff8261@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (263, 'a4afa262', 'F', 'a4afa262@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (264, 'd72b6263', 'F', 'd72b6263@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (265, '5a91d264', 'M', '5a91d264@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (266, 'b5e25265', 'M', 'b5e25265@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (267, 'ac181266', 'M', 'ac181266@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (268, 'b8c73267', 'M', 'b8c73267@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (269, 'ea480268', 'F', 'ea480268@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (270, 'f3afb269', 'F', 'f3afb269@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (271, '4f007270', 'F', '4f007270@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (272, '9f07e271', 'F', '9f07e271@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (273, '7bc4b272', 'F', '7bc4b272@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (274, '45065273', 'M', '45065273@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (275, 'c85fb274', 'F', 'c85fb274@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (276, '40372275', 'F', '40372275@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (277, '57193276', 'M', '57193276@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (278, '4581b277', 'M', '4581b277@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (279, '6cc89278', 'F', '6cc89278@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (280, '3cc37279', 'F', '3cc37279@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (281, 'f6d53280', 'M', 'f6d53280@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (282, '7c1f4281', 'F', '7c1f4281@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (283, '13384282', 'M', '13384282@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (284, '9f728283', 'M', '9f728283@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (285, '47ef4284', 'M', '47ef4284@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (286, '81b9e285', 'F', '81b9e285@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (287, 'd319e286', 'F', 'd319e286@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (288, '37003287', 'F', '37003287@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (289, '43300288', 'M', '43300288@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (290, '8df11289', 'F', '8df11289@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (291, '49648290', 'F', '49648290@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (292, 'c1ea7291', 'F', 'c1ea7291@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (293, '794c2292', 'M', '794c2292@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (294, 'fcf9c293', 'F', 'fcf9c293@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (295, '41ffa294', 'M', '41ffa294@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (296, 'd8339295', 'M', 'd8339295@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (297, '4d0d6296', 'M', '4d0d6296@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (298, 'f75d3297', 'F', 'f75d3297@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (299, '349d5298', 'M', '349d5298@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (300, 'c26bd299', 'M', 'c26bd299@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (301, '0729c300', 'F', '0729c300@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (302, 'efcb9301', 'M', 'efcb9301@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (303, 'e0004302', 'F', 'e0004302@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (304, 'ada8e303', 'F', 'ada8e303@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (305, 'e9e90304', 'F', 'e9e90304@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (306, 'df10a305', 'M', 'df10a305@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (307, 'e6631306', 'M', 'e6631306@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (308, '4bd3e307', 'F', '4bd3e307@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (309, '3ce63308', 'F', '3ce63308@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (310, '0ee0f309', 'F', '0ee0f309@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (311, '81cf0310', 'F', '81cf0310@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (312, '8218a311', 'F', '8218a311@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (313, 'c14d2312', 'M', 'c14d2312@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (314, 'd3243313', 'F', 'd3243313@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (315, 'd51d3314', 'F', 'd51d3314@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (316, '64872315', 'M', '64872315@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (317, '865c5316', 'M', '865c5316@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (318, '5fe1d317', 'F', '5fe1d317@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (319, '26ab0318', 'M', '26ab0318@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (320, '27619319', 'F', '27619319@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (321, 'c5f08320', 'M', 'c5f08320@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (322, '6fd3f321', 'M', '6fd3f321@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (323, 'c64ac322', 'F', 'c64ac322@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (324, '0a24f323', 'M', '0a24f323@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (325, '76ef1324', 'F', '76ef1324@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (326, 'd292d325', 'F', 'd292d325@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (327, '314ee326', 'F', '314ee326@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (328, '294b7327', 'M', '294b7327@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (329, 'e187d328', 'F', 'e187d328@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (330, 'a4777329', 'F', 'a4777329@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (331, 'ad0d5330', 'F', 'ad0d5330@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (332, 'd44f6331', 'F', 'd44f6331@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (333, '4d317332', 'F', '4d317332@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (334, 'b4db9333', 'M', 'b4db9333@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (335, 'f3839334', 'F', 'f3839334@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (336, '379d8335', 'F', '379d8335@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (337, 'ff0c3336', 'M', 'ff0c3336@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (338, '57727337', 'F', '57727337@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (339, 'd9569338', 'F', 'd9569338@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (340, 'f26f9339', 'M', 'f26f9339@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (341, 'e1990340', 'F', 'e1990340@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (342, '6c41b341', 'M', '6c41b341@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (343, 'f7e10342', 'F', 'f7e10342@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (344, 'e5d9b343', 'M', 'e5d9b343@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (345, '7cd9b344', 'M', '7cd9b344@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (346, 'e9d3f345', 'F', 'e9d3f345@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (347, '258f7346', 'F', '258f7346@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (348, '7f335347', 'M', '7f335347@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (349, 'b7ea3348', 'M', 'b7ea3348@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (350, 'e79a3349', 'F', 'e79a3349@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (351, 'a8592350', 'M', 'a8592350@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (352, '9bfb9351', 'F', '9bfb9351@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (353, '158fe352', 'M', '158fe352@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (354, 'db7bd353', 'F', 'db7bd353@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (355, '6de7d354', 'M', '6de7d354@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (356, 'c5503355', 'M', 'c5503355@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (357, 'bcb1f356', 'M', 'bcb1f356@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (358, '2a676357', 'M', '2a676357@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (359, 'aec65358', 'M', 'aec65358@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (360, 'd3dc2359', 'F', 'd3dc2359@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (361, '3a2d8360', 'M', '3a2d8360@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (362, '8c091361', 'M', '8c091361@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (363, '13e25362', 'F', '13e25362@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (364, 'c99b4363', 'F', 'c99b4363@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (365, '6c472364', 'M', '6c472364@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (366, '5eb95365', 'F', '5eb95365@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (367, '6594f366', 'M', '6594f366@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (368, '957e2367', 'F', '957e2367@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (369, '49ccb368', 'F', '49ccb368@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (370, '4f290369', 'F', '4f290369@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (371, 'e8dec370', 'F', 'e8dec370@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (372, '3e360371', 'F', '3e360371@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (373, 'd0b6a372', 'M', 'd0b6a372@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (374, '6988e373', 'F', '6988e373@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (375, '77720374', 'M', '77720374@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (376, 'b0319375', 'M', 'b0319375@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (377, 'ce570376', 'M', 'ce570376@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (378, 'b731a377', 'M', 'b731a377@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (379, '77a3b378', 'F', '77a3b378@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (380, '03599379', 'F', '03599379@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (381, 'eed51380', 'F', 'eed51380@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (382, 'fa0c3381', 'M', 'fa0c3381@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (383, '5ab38382', 'M', '5ab38382@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (384, 'bf4a6383', 'F', 'bf4a6383@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (385, 'df3e4384', 'F', 'df3e4384@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (386, '6f5c2385', 'F', '6f5c2385@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (387, '211e3386', 'M', '211e3386@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (388, '86f91387', 'M', '86f91387@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (389, '554d6388', 'F', '554d6388@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (390, 'd0c02389', 'F', 'd0c02389@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (391, 'd107f390', 'M', 'd107f390@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (392, '1637c391', 'F', '1637c391@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (393, 'bd523392', 'F', 'bd523392@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (394, 'f11fa393', 'M', 'f11fa393@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (395, '96b1d394', 'M', '96b1d394@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (396, 'f76ad395', 'M', 'f76ad395@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (397, '21ced396', 'F', '21ced396@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (398, '785c3397', 'F', '785c3397@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (399, '6eb84398', 'F', '6eb84398@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (400, 'fb641399', 'F', 'fb641399@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (401, '00a22400', 'F', '00a22400@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (402, 'cb574401', 'F', 'cb574401@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (403, 'fc259402', 'M', 'fc259402@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (404, '6c1ae403', 'F', '6c1ae403@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (405, '6cf81404', 'F', '6cf81404@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (406, 'e4f1c405', 'F', 'e4f1c405@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (407, 'ab0de406', 'F', 'ab0de406@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (408, '418c1407', 'M', '418c1407@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (409, '7ca1b408', 'M', '7ca1b408@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (410, 'd698d409', 'F', 'd698d409@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (411, '64ed0410', 'F', '64ed0410@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (412, '81284411', 'M', '81284411@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (413, '01253412', 'F', '01253412@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (414, '38893413', 'F', '38893413@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (415, '8e0a1414', 'F', '8e0a1414@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (416, '2d929415', 'F', '2d929415@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (417, '5e23d416', 'F', '5e23d416@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (418, 'f9db8417', 'F', 'f9db8417@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (419, '2c8f9418', 'M', '2c8f9418@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (420, '0da45419', 'M', '0da45419@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (421, '4c0f4420', 'M', '4c0f4420@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (422, '8fac2421', 'M', '8fac2421@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (423, '014d9422', 'F', '014d9422@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (424, '47b61423', 'M', '47b61423@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (425, '71ce9424', 'M', '71ce9424@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (426, '79f47425', 'F', '79f47425@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (427, '49855426', 'F', '49855426@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (428, 'f4cf2427', 'M', 'f4cf2427@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (429, 'd8381428', 'M', 'd8381428@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (430, '117c6429', 'F', '117c6429@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (431, '0f984430', 'M', '0f984430@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (432, 'f0191431', 'F', 'f0191431@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (433, '71e3d432', 'M', '71e3d432@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (434, 'be152433', 'F', 'be152433@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (435, 'a8244434', 'F', 'a8244434@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (436, '490d9435', 'F', '490d9435@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (437, '2e596436', 'F', '2e596436@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (438, '01fdb437', 'F', '01fdb437@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (439, '7213f438', 'M', '7213f438@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (440, 'ad7da439', 'F', 'ad7da439@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (441, '37a97440', 'F', '37a97440@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (442, 'dde8b441', 'M', 'dde8b441@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (443, 'd5db1442', 'M', 'd5db1442@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (444, '59d43443', 'M', '59d43443@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (445, '1c895444', 'F', '1c895444@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (446, 'ffb4b445', 'M', 'ffb4b445@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (447, 'b4224446', 'M', 'b4224446@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (448, '74259447', 'F', '74259447@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (449, 'be392448', 'M', 'be392448@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (450, '5f52e449', 'M', '5f52e449@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (451, '49b04450', 'M', '49b04450@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (452, '57529451', 'F', '57529451@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (453, 'de2c8452', 'M', 'de2c8452@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (454, 'c4e33453', 'F', 'c4e33453@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (455, '24ab4454', 'M', '24ab4454@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (456, '1754d455', 'F', '1754d455@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (457, '558aa456', 'M', '558aa456@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (458, '604eb457', 'F', '604eb457@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (459, '000eb458', 'M', '000eb458@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (460, '274c1459', 'F', '274c1459@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (461, '73867460', 'M', '73867460@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (462, 'e1004461', 'M', 'e1004461@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (463, '5d3bb462', 'M', '5d3bb462@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (464, '55951463', 'M', '55951463@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (465, 'e23ca464', 'M', 'e23ca464@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (466, 'a96cd465', 'F', 'a96cd465@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (467, '067ed466', 'F', '067ed466@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (468, '909ea467', 'M', '909ea467@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (469, '1af45468', 'F', '1af45468@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (470, '2182a469', 'F', '2182a469@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (471, '8af06470', 'M', '8af06470@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (472, '84f09471', 'M', '84f09471@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (473, 'b1c76472', 'F', 'b1c76472@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (474, 'dfd17473', 'F', 'dfd17473@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (475, '79b33474', 'M', '79b33474@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (476, '974fe475', 'F', '974fe475@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (477, '23773476', 'F', '23773476@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (478, '52c97477', 'M', '52c97477@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (479, 'f8441478', 'F', 'f8441478@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (480, 'a0572479', 'M', 'a0572479@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (481, '9f246480', 'M', '9f246480@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (482, 'e3e1b481', 'M', 'e3e1b481@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (483, '48f75482', 'F', '48f75482@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (484, 'b96b4483', 'M', 'b96b4483@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (485, '6e506484', 'M', '6e506484@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (486, 'c56bf485', 'F', 'c56bf485@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (487, '70913486', 'M', '70913486@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (488, 'e9543487', 'F', 'e9543487@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (489, '291fa488', 'M', '291fa488@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (490, '35c06489', 'F', '35c06489@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (491, '0afe4490', 'M', '0afe4490@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (492, '726e0491', 'M', '726e0491@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (493, 'afef4492', 'M', 'afef4492@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (494, '90467493', 'M', '90467493@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (495, 'b199a494', 'F', 'b199a494@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (496, '2f5c1495', 'F', '2f5c1495@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (497, 'e614c496', 'F', 'e614c496@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (498, 'df58c497', 'M', 'df58c497@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (499, '1633c498', 'M', '1633c498@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (500, '76df7499', 'F', '76df7499@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (501, '80647500', 'F', '80647500@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (502, 'a8934501', 'M', 'a8934501@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (503, '8adde502', 'M', '8adde502@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (504, 'c4074503', 'M', 'c4074503@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (505, '40d6c504', 'M', '40d6c504@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (506, '32623505', 'M', '32623505@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (507, 'c896b506', 'M', 'c896b506@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (508, 'd65e6507', 'M', 'd65e6507@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (509, 'cc89c508', 'M', 'cc89c508@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (510, '12a67509', 'F', '12a67509@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (511, '73d98510', 'F', '73d98510@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (512, 'fb8d5511', 'M', 'fb8d5511@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (513, '55709512', 'M', '55709512@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (514, 'a776f513', 'M', 'a776f513@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (515, 'aadb6514', 'M', 'aadb6514@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (516, 'efa83515', 'F', 'efa83515@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (517, '282af516', 'M', '282af516@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (518, 'afdb5517', 'F', 'afdb5517@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (519, 'c160a518', 'F', 'c160a518@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (520, '44ed0519', 'M', '44ed0519@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (521, 'a6a64520', 'F', 'a6a64520@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (522, '55052521', 'F', '55052521@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (523, 'b07a8522', 'F', 'b07a8522@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (524, 'd1580523', 'M', 'd1580523@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (525, '90a49524', 'M', '90a49524@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (526, 'dbca4525', 'F', 'dbca4525@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (527, '60796526', 'F', '60796526@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (528, 'c1544527', 'M', 'c1544527@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (529, '541b9528', 'F', '541b9528@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (530, '272d1529', 'M', '272d1529@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (531, '9d3b5530', 'F', '9d3b5530@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (532, '0bc48531', 'F', '0bc48531@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (533, '9a602532', 'F', '9a602532@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (534, 'd38ff533', 'F', 'd38ff533@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (535, '9a37c534', 'F', '9a37c534@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (536, 'de4bb535', 'M', 'de4bb535@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (537, 'e5cdc536', 'M', 'e5cdc536@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (538, '123f9537', 'M', '123f9537@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (539, 'd69cd538', 'F', 'd69cd538@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (540, '8347b539', 'F', '8347b539@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (541, 'cb088540', 'F', 'cb088540@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (542, '03842541', 'F', '03842541@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (543, '96512542', 'M', '96512542@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (544, '5a7c9543', 'F', '5a7c9543@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (545, '85a67544', 'F', '85a67544@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (546, '0d7eb545', 'M', '0d7eb545@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (547, 'b66ca546', 'M', 'b66ca546@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (548, 'a9b3a547', 'F', 'a9b3a547@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (549, 'bc278548', 'M', 'bc278548@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (550, '334b8549', 'M', '334b8549@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (551, 'ae6dd550', 'F', 'ae6dd550@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (552, 'c9d37551', 'F', 'c9d37551@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (553, 'e71e5552', 'M', 'e71e5552@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (554, '76ea2553', 'M', '76ea2553@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (555, '30531554', 'M', '30531554@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (556, '6fef1555', 'M', '6fef1555@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (557, 'f39a2556', 'M', 'f39a2556@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (558, 'be7c3557', 'F', 'be7c3557@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (559, '7a47b558', 'M', '7a47b558@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (560, 'df35f559', 'F', 'df35f559@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (561, '57aec560', 'M', '57aec560@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (562, 'b4f95561', 'F', 'b4f95561@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (563, 'd5f1d562', 'F', 'd5f1d562@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (564, '367b4563', 'F', '367b4563@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (565, '1081e564', 'F', '1081e564@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (566, '9ad8b565', 'M', '9ad8b565@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (567, 'd616c566', 'M', 'd616c566@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (568, 'c85d6567', 'F', 'c85d6567@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (569, 'fb7f7568', 'F', 'fb7f7568@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (570, 'e0a63569', 'M', 'e0a63569@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (571, '0ce06570', 'M', '0ce06570@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (572, 'c7a61571', 'F', 'c7a61571@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (573, '38148572', 'M', '38148572@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (574, 'f04bc573', 'F', 'f04bc573@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (575, '4f3d0574', 'F', '4f3d0574@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (576, 'e3539575', 'M', 'e3539575@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (577, 'f14d5576', 'M', 'f14d5576@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (578, 'd1b8b577', 'F', 'd1b8b577@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (579, '9e502578', 'F', '9e502578@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (580, '44e03579', 'M', '44e03579@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (581, '55c4f580', 'M', '55c4f580@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (582, 'd9590581', 'M', 'd9590581@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (583, '7b2d7582', 'M', '7b2d7582@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (584, '5c44e583', 'F', '5c44e583@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (585, '3e45a584', 'F', '3e45a584@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (586, 'ebfcb585', 'F', 'ebfcb585@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (587, 'fff26586', 'F', 'fff26586@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (588, '722f5587', 'M', '722f5587@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (589, '0b125588', 'M', '0b125588@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (590, '0d43f589', 'M', '0d43f589@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (591, '6ec74590', 'M', '6ec74590@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (592, '6a434591', 'F', '6a434591@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (593, 'bd3e5592', 'F', 'bd3e5592@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (594, '8c284593', 'F', '8c284593@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (595, '99c4e594', 'F', '99c4e594@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (596, '7a90f595', 'F', '7a90f595@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (597, 'f5d79596', 'F', 'f5d79596@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (598, '27205597', 'F', '27205597@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (599, '4bd87598', 'M', '4bd87598@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (600, '70bd3599', 'F', '70bd3599@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (601, 'b70b2600', 'F', 'b70b2600@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (602, '810d6601', 'F', '810d6601@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (603, '6fb93602', 'M', '6fb93602@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (604, 'b2bf6603', 'F', 'b2bf6603@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (605, 'b9f3c604', 'M', 'b9f3c604@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (606, 'e8e0d605', 'M', 'e8e0d605@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (607, 'c9c83606', 'F', 'c9c83606@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (608, '6d59b607', 'F', '6d59b607@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (609, '73890608', 'M', '73890608@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (610, '48815609', 'F', '48815609@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (611, 'daef7610', 'F', 'daef7610@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (612, '78097611', 'M', '78097611@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (613, '85c87612', 'M', '85c87612@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (614, '19581613', 'F', '19581613@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (615, '21c8a614', 'F', '21c8a614@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (616, '4ebf5615', 'M', '4ebf5615@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (617, '9906e616', 'M', '9906e616@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (618, '0ccd8617', 'F', '0ccd8617@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (619, '664d5618', 'M', '664d5618@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (620, 'a4f9a619', 'M', 'a4f9a619@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (621, '0817e620', 'F', '0817e620@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (622, 'e342c621', 'F', 'e342c621@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (623, '187e3622', 'M', '187e3622@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (624, '7e522623', 'F', '7e522623@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (625, '504ef624', 'M', '504ef624@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (626, '37468625', 'F', '37468625@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (627, 'bdf98626', 'F', 'bdf98626@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (628, 'df7ca627', 'F', 'df7ca627@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (629, '74ea1628', 'M', '74ea1628@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (630, '08150629', 'F', '08150629@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (631, 'e0494630', 'M', 'e0494630@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (632, '6d531631', 'M', '6d531631@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (633, '08e36632', 'M', '08e36632@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (634, '7dad4633', 'F', '7dad4633@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (635, 'abb3d634', 'F', 'abb3d634@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (636, '70872635', 'M', '70872635@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (637, 'eb002636', 'M', 'eb002636@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (638, '04982637', 'F', '04982637@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (639, '56046638', 'F', '56046638@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (640, '9e818639', 'F', '9e818639@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (641, 'd6f96640', 'F', 'd6f96640@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (642, '529e5641', 'F', '529e5641@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (643, 'b966a642', 'F', 'b966a642@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (644, '90f17643', 'M', '90f17643@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (645, 'ffe60644', 'M', 'ffe60644@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (646, 'b6cc9645', 'F', 'b6cc9645@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (647, 'a1bb2646', 'F', 'a1bb2646@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (648, '279fa647', 'M', '279fa647@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (649, 'a8f42648', 'F', 'a8f42648@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (650, '12fe5649', 'M', '12fe5649@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (651, '1b7ed650', 'M', '1b7ed650@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (652, '58408651', 'F', '58408651@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (653, '2f253652', 'F', '2f253652@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (654, 'b4126653', 'F', 'b4126653@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (655, 'c4ca4654', 'F', 'c4ca4654@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (656, 'beab9655', 'F', 'beab9655@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (657, 'feb39656', 'M', 'feb39656@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (658, '5c85d657', 'M', '5c85d657@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (659, '16c72658', 'M', '16c72658@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (660, '767ca659', 'F', '767ca659@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (661, '25ae9660', 'M', '25ae9660@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (662, 'd04b9661', 'F', 'd04b9661@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (663, '96a20662', 'F', '96a20662@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (664, 'd56e5663', 'F', 'd56e5663@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (665, '97a5f664', 'F', '97a5f664@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (666, '1fa6d665', 'M', '1fa6d665@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (667, 'f4a5a666', 'M', 'f4a5a666@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (668, '8fcac667', 'F', '8fcac667@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (669, '3d25d668', 'F', '3d25d668@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (670, '8b054669', 'F', '8b054669@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (671, '437b6670', 'M', '437b6670@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (672, 'bf771671', 'M', 'bf771671@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (673, '72a0a672', 'F', '72a0a672@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (674, 'cf7ff673', 'F', 'cf7ff673@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (675, '95f11674', 'M', '95f11674@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (676, '60872675', 'F', '60872675@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (677, '50a73676', 'F', '50a73676@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (678, 'f8974677', 'F', 'f8974677@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (679, '8f31f678', 'M', '8f31f678@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (680, 'eda8f679', 'M', 'eda8f679@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (681, '8d8f9680', 'M', '8d8f9680@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (682, '3440d681', 'M', '3440d681@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (683, 'c28dc682', 'F', 'c28dc682@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (684, '1b4e3683', 'M', '1b4e3683@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (685, 'ad61a684', 'M', 'ad61a684@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (686, '2be06685', 'M', '2be06685@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (687, '169d5686', 'M', '169d5686@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (688, 'cf9ef687', 'M', 'cf9ef687@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (689, '0ed30688', 'M', '0ed30688@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (690, '95a4f689', 'M', '95a4f689@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (691, 'ddfb5690', 'F', 'ddfb5690@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (692, '303aa691', 'M', '303aa691@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (693, '595ac692', 'M', '595ac692@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (694, '2a82a693', 'F', '2a82a693@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (695, '2dfd1694', 'M', '2dfd1694@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (696, '2adb2695', 'F', '2adb2695@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (697, '0f6b2696', 'M', '0f6b2696@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (698, '74d59697', 'F', '74d59697@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (699, '19169698', 'F', '19169698@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (700, 'a7f7e699', 'M', 'a7f7e699@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (701, 'ba4fd700', 'F', 'ba4fd700@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (702, '0d64a701', 'M', '0d64a701@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (703, '480c9702', 'F', '480c9702@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (704, '05d91703', 'F', '05d91703@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (705, '3df74704', 'F', '3df74704@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (706, 'f46d3705', 'M', 'f46d3705@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (707, '8afae706', 'F', '8afae706@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (708, '9dd75707', 'F', '9dd75707@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (709, '08bfc708', 'M', '08bfc708@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (710, 'c184a709', 'F', 'c184a709@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (711, '4cb58710', 'M', '4cb58710@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (712, 'e50ff711', 'F', 'e50ff711@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (713, '488ab712', 'F', '488ab712@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (714, '08c79713', 'M', '08c79713@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (715, '431c0714', 'M', '431c0714@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (716, '421a7715', 'M', '421a7715@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (717, '36610716', 'F', '36610716@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (718, '93662717', 'M', '93662717@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (719, 'de939718', 'F', 'de939718@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (720, '04d6c719', 'F', '04d6c719@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (721, '24e53720', 'M', '24e53720@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (722, 'ab251721', 'F', 'ab251721@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (723, '196e6722', 'F', '196e6722@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (724, 'a9cf6723', 'F', 'a9cf6723@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (725, '0adcd724', 'F', '0adcd724@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (726, 'bf4a2725', 'M', 'bf4a2725@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (727, '1b5d5726', 'F', '1b5d5726@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (728, '326e8727', 'M', '326e8727@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (729, '522e3728', 'M', '522e3728@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (730, '7951b729', 'F', '7951b729@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (731, '1431e730', 'M', '1431e730@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (732, '764d6731', 'F', '764d6731@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (733, 'd3f46732', 'F', 'd3f46732@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (734, 'cf58c733', 'F', 'cf58c733@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (735, '184b6734', 'M', '184b6734@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (736, '4dc95735', 'M', '4dc95735@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (737, 'b2318736', 'F', 'b2318736@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (738, '30036737', 'F', '30036737@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (739, 'b7b3f738', 'M', 'b7b3f738@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (740, 'c99e0739', 'M', 'c99e0739@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (741, '376ef740', 'F', '376ef740@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (742, '6587c741', 'F', '6587c741@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (743, '514ab742', 'F', '514ab742@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (744, '1b15e743', 'M', '1b15e743@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (745, 'a57e0744', 'F', 'a57e0744@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (746, '16cd2745', 'F', '16cd2745@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (747, '6e409746', 'F', '6e409746@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (748, '0629e747', 'F', '0629e747@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (749, 'd8bbf748', 'M', 'd8bbf748@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (750, '88800749', 'F', '88800749@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (751, 'ef284750', 'M', 'ef284750@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (752, '4cb9e751', 'F', '4cb9e751@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (753, '85afe752', 'F', '85afe752@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (754, '5369d753', 'F', '5369d753@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (755, '20ef0754', 'F', '20ef0754@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (756, 'ba965755', 'F', 'ba965755@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (757, '30cbf756', 'F', '30cbf756@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (758, 'a99cf757', 'F', 'a99cf757@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (759, '5a84d758', 'M', '5a84d758@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (760, 'c64fe759', 'M', 'c64fe759@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (761, 'da73a760', 'F', 'da73a760@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (762, 'c51ec761', 'M', 'c51ec761@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (763, '77fac762', 'F', '77fac762@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (764, '64b78763', 'M', '64b78763@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (765, 'a5784764', 'F', 'a5784764@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (766, '4b02d765', 'F', '4b02d765@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (767, '0d680766', 'F', '0d680766@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (768, '58c9b767', 'M', '58c9b767@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (769, '2dd67768', 'M', '2dd67768@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (770, '509b1769', 'F', '509b1769@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (771, '64829770', 'F', '64829770@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (772, '17038771', 'F', '17038771@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (773, '478ce772', 'F', '478ce772@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (774, '5d1e6773', 'F', '5d1e6773@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (775, '4fd06774', 'F', '4fd06774@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (776, '7371a775', 'F', '7371a775@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (777, 'b48bc776', 'M', 'b48bc776@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (778, '30cb9777', 'F', '30cb9777@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (779, '46ab3778', 'M', '46ab3778@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (780, '145c6779', 'M', '145c6779@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (781, 'cfb83780', 'F', 'cfb83780@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (782, 'be8f9781', 'F', 'be8f9781@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (783, '9a2da782', 'M', '9a2da782@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (784, 'ce586783', 'M', 'ce586783@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (785, 'cad6c784', 'F', 'cad6c784@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (786, '76159785', 'M', '76159785@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (787, '9b290786', 'M', '9b290786@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (788, '3f69b787', 'M', '3f69b787@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (789, '5d924788', 'F', '5d924788@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (790, 'e8fc0789', 'F', 'e8fc0789@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (791, '30583790', 'F', '30583790@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (792, '07d39791', 'M', '07d39791@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (793, 'cd341792', 'M', 'cd341792@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (794, '50654793', 'M', '50654793@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (795, '73398794', 'F', '73398794@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (796, '41170795', 'M', '41170795@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (797, 'd62fd796', 'F', 'd62fd796@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (798, '02d42797', 'M', '02d42797@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (799, '0fb6f798', 'F', '0fb6f798@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (800, 'b3016799', 'M', 'b3016799@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (801, '16d87800', 'F', '16d87800@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (802, 'ed2f9801', 'M', 'ed2f9801@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (803, 'eca97802', 'F', 'eca97802@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (804, 'de70b803', 'M', 'de70b803@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (805, '9e4be804', 'M', '9e4be804@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (806, 'b30b0805', 'F', 'b30b0805@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (807, '5cb2b806', 'M', '5cb2b806@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (808, '20a07807', 'M', '20a07807@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (809, '1b6fb808', 'F', '1b6fb808@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (810, '1dba1809', 'M', '1dba1809@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (811, '38885810', 'M', '38885810@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (812, '85df0811', 'F', '85df0811@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (813, '18782812', 'M', '18782812@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (814, '42416813', 'F', '42416813@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (815, 'e55bf814', 'F', 'e55bf814@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (816, 'c8d0d815', 'F', 'c8d0d815@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (817, '70d5d816', 'M', '70d5d816@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (818, 'ca808817', 'F', 'ca808817@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (819, '1f3a4818', 'F', '1f3a4818@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (820, '38be3819', 'M', '38be3819@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (821, '77b58820', 'F', '77b58820@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (822, '16ac2821', 'M', '16ac2821@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (823, '8766b822', 'F', '8766b822@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (824, '92ca5823', 'F', '92ca5823@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (825, '20bde824', 'F', '20bde824@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (826, 'c4d95825', 'M', 'c4d95825@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (827, '80b1b826', 'M', '80b1b826@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (828, '5d5fa827', 'M', '5d5fa827@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (829, 'c689d828', 'F', 'c689d828@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (830, '6b22d829', 'F', '6b22d829@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (831, '746c5830', 'M', '746c5830@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (832, '1dbc4831', 'M', '1dbc4831@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (833, 'e7ee1832', 'M', 'e7ee1832@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (834, 'f3850833', 'F', 'f3850833@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (835, '13d49834', 'M', '13d49834@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (836, 'd6fd3835', 'F', 'd6fd3835@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (837, 'ff772836', 'M', 'ff772836@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (838, 'b44ab837', 'M', 'b44ab837@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (839, '21697838', 'F', '21697838@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (840, '16d6b839', 'F', '16d6b839@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (841, '669cc840', 'F', '669cc840@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (842, '96c28841', 'F', '96c28841@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (843, 'e9bde842', 'M', 'e9bde842@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (844, '83d8e843', 'F', '83d8e843@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (845, '6f317844', 'M', '6f317844@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (846, 'bf2a9845', 'F', 'bf2a9845@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (847, '08f6e846', 'F', '08f6e846@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (848, '729ef847', 'M', '729ef847@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (849, 'b3089848', 'M', 'b3089848@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (850, 'e1ba2849', 'F', 'e1ba2849@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (851, '02891850', 'F', '02891850@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (852, '67a4d851', 'M', '67a4d851@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (853, 'd3742852', 'F', 'd3742852@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (854, 'baf7e853', 'M', 'baf7e853@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (855, '77428854', 'M', '77428854@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (856, '3051b855', 'M', '3051b855@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (857, '10e77856', 'F', '10e77856@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (858, '5c3e1857', 'F', '5c3e1857@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (859, '81bd0858', 'F', '81bd0858@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (860, '1c4f6859', 'M', '1c4f6859@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (861, '74880860', 'F', '74880860@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (862, 'c75d9861', 'M', 'c75d9861@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (863, 'cd8c9862', 'M', 'cd8c9862@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (864, 'b1f9f863', 'M', 'b1f9f863@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (865, '056a1864', 'M', '056a1864@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (866, 'fd5b8865', 'M', 'fd5b8865@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (867, '63f6d866', 'F', '63f6d866@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (868, '51851867', 'M', '51851867@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (869, '9fec6868', 'F', '9fec6868@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (870, '5ad06869', 'F', '5ad06869@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (871, '0887c870', 'M', '0887c870@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (872, '26b67871', 'M', '26b67871@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (873, '9f342872', 'M', '9f342872@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (874, 'a8aef873', 'M', 'a8aef873@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (875, '6ebf8874', 'F', '6ebf8874@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (876, '7644e875', 'M', '7644e875@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (877, '74716876', 'F', '74716876@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (878, '9405f877', 'M', '9405f877@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (879, '5b06f878', 'M', '5b06f878@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (880, '043d3879', 'F', '043d3879@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (881, '95135880', 'M', '95135880@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (882, '5e480881', 'M', '5e480881@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (883, '104b9882', 'F', '104b9882@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (884, '0e6bb883', 'F', '0e6bb883@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (885, 'd3bb5884', 'F', 'd3bb5884@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (886, 'a1aef885', 'F', 'a1aef885@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (887, '6caaa886', 'F', '6caaa886@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (888, '993e1887', 'M', '993e1887@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (889, '4026d888', 'M', '4026d888@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (890, 'efd9d889', 'F', 'efd9d889@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (891, '1de43890', 'F', '1de43890@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (892, 'e0698891', 'F', 'e0698891@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (893, '6bfe0892', 'F', '6bfe0892@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (894, '4ff6b893', 'F', '4ff6b893@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (895, 'da352894', 'F', 'da352894@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (896, '47020895', 'F', '47020895@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (897, '75cea896', 'F', '75cea896@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (898, '92625897', 'F', '92625897@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (899, 'aa39c898', 'F', 'aa39c898@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (900, '0560b899', 'F', '0560b899@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (901, '3316e900', 'F', '3316e900@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (902, 'ff4c9901', 'F', 'ff4c9901@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (903, '86a73902', 'F', '86a73902@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (904, 'e4dc8903', 'F', 'e4dc8903@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (905, '8d103904', 'M', '8d103904@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (906, '547de905', 'F', '547de905@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (907, 'a4613906', 'M', 'a4613906@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (908, '74d58907', 'F', '74d58907@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (909, 'b5ca1908', 'M', 'b5ca1908@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (910, '4eb9f909', 'F', '4eb9f909@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (911, '682c6910', 'M', '682c6910@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (912, '0212a911', 'F', '0212a911@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (913, 'b9b72912', 'F', 'b9b72912@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (914, 'a97e8913', 'F', 'a97e8913@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (915, '98157914', 'F', '98157914@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (916, '2052c915', 'F', '2052c915@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (917, 'fc361916', 'F', 'fc361916@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (918, 'ef928917', 'M', 'ef928917@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (919, '1cf63918', 'M', '1cf63918@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (920, '55d5b919', 'F', '55d5b919@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (921, '054c8920', 'M', '054c8920@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (922, '691d5921', 'F', '691d5921@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (923, 'f3c53922', 'F', 'f3c53922@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (924, '4fc94923', 'M', '4fc94923@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (925, '61726924', 'M', '61726924@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (926, '0a542925', 'M', '0a542925@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (927, 'f2d08926', 'F', 'f2d08926@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (928, 'f7bd1927', 'M', 'f7bd1927@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (929, '64305928', 'F', '64305928@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (930, 'ada75929', 'F', 'ada75929@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (931, 'c721b930', 'M', 'c721b930@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (932, 'dfd65931', 'M', 'dfd65931@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (933, 'b537e932', 'F', 'b537e932@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (934, 'fab4d933', 'M', 'fab4d933@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (935, 'af4d8934', 'M', 'af4d8934@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (936, '708db935', 'F', '708db935@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (937, 'd8db1936', 'M', 'd8db1936@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (938, '89c84937', 'M', '89c84937@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (939, 'ab76e938', 'M', 'ab76e938@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (940, '2c77f939', 'M', '2c77f939@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (941, '157cf940', 'M', '157cf940@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (942, '54980941', 'M', '54980941@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (943, '1a5ba942', 'M', '1a5ba942@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (944, '1da70943', 'M', '1da70943@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (945, '86626944', 'F', '86626944@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (946, 'f9008945', 'F', 'f9008945@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (947, '2ecae946', 'F', '2ecae946@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (948, '5c2cb947', 'F', '5c2cb947@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (949, 'a24ad948', 'F', 'a24ad948@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (950, 'df1e5949', 'M', 'df1e5949@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (951, '06a57950', 'M', '06a57950@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (952, '8a330951', 'F', '8a330951@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (953, 'cdd60952', 'M', 'cdd60952@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (954, 'b6b5d953', 'M', 'b6b5d953@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (955, '2d498954', 'F', '2d498954@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (956, '04dc9955', 'F', '04dc9955@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (957, '80325956', 'M', '80325956@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (958, 'd0594957', 'M', 'd0594957@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (959, '5612a958', 'M', '5612a958@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (960, 'a5ada959', 'F', 'a5ada959@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (961, '3e228960', 'F', '3e228960@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (962, 'a8025961', 'M', 'a8025961@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (963, '1ee64962', 'M', '1ee64962@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (964, '01b31963', 'M', '01b31963@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (965, '2ce92964', 'M', '2ce92964@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (966, '01edd965', 'F', '01edd965@nihility.cn', 6);
INSERT INTO `tab_emp` VALUES (967, 'e1bb3966', 'M', 'e1bb3966@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (968, 'f4453967', 'F', 'f4453967@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (969, '3b88c968', 'F', '3b88c968@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (970, '39c44969', 'M', '39c44969@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (971, '1cc47970', 'M', '1cc47970@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (972, 'cfb79971', 'F', 'cfb79971@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (973, '640d4972', 'F', '640d4972@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (974, '946c0973', 'F', '946c0973@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (975, 'd6954974', 'M', 'd6954974@nihility.cn', 7);
INSERT INTO `tab_emp` VALUES (976, '74a0a975', 'M', '74a0a975@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (977, '92d02976', 'F', '92d02976@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (978, '0b014977', 'M', '0b014977@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (979, '783a0978', 'M', '783a0978@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (980, '430b8979', 'F', '430b8979@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (981, '10b6b980', 'M', '10b6b980@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (982, 'dd2aa981', 'M', 'dd2aa981@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (983, '2fd0e982', 'F', '2fd0e982@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (984, 'ff6c7983', 'M', 'ff6c7983@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (985, '29cca984', 'M', '29cca984@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (986, 'fd337985', 'F', 'fd337985@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (987, 'b8670986', 'M', 'b8670986@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (988, '89e0b987', 'F', '89e0b987@nihility.cn', 9);
INSERT INTO `tab_emp` VALUES (989, 'ccbbb988', 'M', 'ccbbb988@nihility.cn', 3);
INSERT INTO `tab_emp` VALUES (990, '4a500989', 'F', '4a500989@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (991, '71e9f990', 'F', '71e9f990@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (992, 'f2d6c991', 'F', 'f2d6c991@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (993, 'c7d29992', 'F', 'c7d29992@nihility.cn', 10);
INSERT INTO `tab_emp` VALUES (994, 'eabaf993', 'M', 'eabaf993@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (995, 'b365b994', 'F', 'b365b994@nihility.cn', 1);
INSERT INTO `tab_emp` VALUES (996, '56c2a995', 'M', '56c2a995@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (997, '7fa41996', 'M', '7fa41996@nihility.cn', 2);
INSERT INTO `tab_emp` VALUES (998, '42138997', 'F', '42138997@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (999, '803a6998', 'F', '803a6998@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (1000, '7975c999', 'M', '7975c999@nihility.cn', 5);
INSERT INTO `tab_emp` VALUES (1001, 'df7e91000', 'M', 'df7e91000@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (1002, '02dff1001', 'F', '02dff1001@nihility.cn', 11);
INSERT INTO `tab_emp` VALUES (1003, 'c4c941002', 'M', 'c4c941002@nihility.cn', 4);
INSERT INTO `tab_emp` VALUES (1004, 'a58831003', 'M', 'a58831003@nihility.cn', 8);
INSERT INTO `tab_emp` VALUES (1005, 'kkl', 'M', 'kk@kk.com', 9);
|
CREATE TABLE public."Billboard1" (
"date" date NULL,
"rank" int4 NULL,
song varchar(300) NULL,
artist varchar(300) NULL,
"last-week" float8 NULL,
"peak-rank" int4 NULL,
"weeks-on-board" int4 NULL
);
--Dados carregados a partir de:
--https://www.kaggle.com/dhruvildave/billboard-the-hot-100-songs
select
TBB."date",
TBB."rank",
TBB.song,
TBB.artist,
TBB."last-week",
TBB."peak-rank",
TBB."weeks-on-board"
from
"Billboard" as TBB
limit 10;
--Data mais recente de informação
select max("date") from "Billboard" b
--Data mais antiga de informação
select min("date") from "Billboard" b
--Dados da semana mais recente na tabela
select
TBB."date",
TBB."rank",
TBB.song,
TBB.artist,
TBB."last-week",
TBB."peak-rank",
TBB."weeks-on-board"
from
"Billboard" as TBB
where
TBB."date" = (
select
max("date")
from
"Billboard" b);
-- Filtrar total de músicas do Chuck Berry
select
b.artist,
b.song,
count(1) as total
from
"Billboard" b
where
b.artist like any (array['%Chuck%Berry%',
'%Frankie Vaughan%'])
group by
1,
2
order by
total desc;
|
SELECT LS_Process._id as id ,LS_Process.setPointCode as code,LS_Point.geom as geom
, count(LS_Observation._id) as counter
FROM sql.LS_Process, sql.LS_Point ,sql.LS_Observation
WHERE LS_Process.setPointCode=LS_Point.tmpcode
AND LS_Observation.fk_process =LS_Process._id
group by LS_Process._id, geom |
DROP PROCEDURE CPI.SEARCH_FOR_PACK_POLICY2;
CREATE OR REPLACE PROCEDURE CPI.search_for_pack_policy2(
p_par_id IN GIPI_WPOLBAS.par_id%TYPE,
p_line_cd IN GIPI_POLBASIC.line_cd%TYPE,
p_subline_cd IN GIPI_POLBASIC.subline_cd%TYPE,
p_iss_cd IN GIPI_POLBASIC.iss_cd%TYPE,
p_issue_yy IN GIPI_POLBASIC.issue_yy%TYPE,
p_pol_seq_no IN GIPI_POLBASIC.pol_seq_no%TYPE,
p_renew_no IN GIPI_POLBASIC.renew_no%TYPE,
p_eff_date IN GIPI_WPOLBAS.eff_date%TYPE,
p_expiry_date IN GIPI_WPOLBAS.expiry_date%TYPE,
pv_expiry_date OUT GIPI_WPOLBAS.expiry_date%TYPE,
p_ann_tsi_amt OUT GIPI_WPOLBAS.ann_tsi_amt%TYPE,
p_ann_prem_amt OUT GIPI_WPOLBAS.ann_prem_amt%TYPE,
p_msg_alert OUT VARCHAR2,
p_success OUT BOOLEAN
)
IS
tmp_incept_date gipi_wpolbas.incept_date%TYPE;
tmp_expiry_date gipi_wpolbas.expiry_date%TYPE;
tmp_eff_date gipi_wpolbas.eff_date%TYPE;
tmp_endt_expiry_date gipi_wpolbas.endt_expiry_date%TYPE;
tmp_mortg_name gipi_wpolbas.mortg_name%TYPE;
tmp_prov_prem_tag gipi_wpolbas.prov_prem_tag%TYPE;
tmp_prov_prem_pct gipi_wpolbas.prov_prem_pct%TYPE;
tmp_govt_acc_sw gipi_wpolbas.foreign_acc_sw%TYPE;
tmp_comp_sw gipi_wpolbas.comp_sw%TYPE;
tmp_prem_warr_tag gipi_wpolbas.prem_warr_tag%TYPE;
tmp_prorate_flag gipi_wpolbas.prorate_flag%TYPE;
tmp_short_rt_percent gipi_wpolbas.short_rt_percent%TYPE;
tmp_add1 gipi_wpolbas.address1%TYPE;
tmp_add2 gipi_wpolbas.address1%TYPE;
tmp_add3 gipi_wpolbas.address1%TYPE;
tmp_assd_no gipi_wpolbas.assd_no%TYPE;
tmp_type_cd gipi_wpolbas.type_cd%TYPE;
tmp_ann_tsi_amt gipi_wpolbas.ann_tsi_amt%TYPE;
tmp_ann_prem_amt gipi_wpolbas.ann_prem_amt%TYPE;
fi_line_cd gipi_wpolbas.subline_cd%TYPE; --* To store parameter value of line FIRE *--
tmp_incept_tag gipi_wpolbas.incept_tag%TYPE;
tmp_expiry_tag gipi_wpolbas.expiry_tag%TYPE;
tmp_endt_expiry_tag gipi_wpolbas.endt_expiry_tag%TYPE;
tmp_reg_policy_sw gipi_wpolbas.reg_policy_sw%TYPE;
tmp_co_insurance_sw gipi_wpolbas.co_insurance_sw%TYPE;
tmp_manual_renew_no gipi_wpolbas.manual_renew_no%TYPE;
tmp_cred_branch gipi_wpolbas.cred_branch%TYPE;
tmp_ref_pol_no gipi_wpolbas.ref_pol_no%TYPE;
v_max_eff_date1 gipi_wpolbas.eff_date%TYPE;
v_max_eff_date2 gipi_wpolbas.eff_date%TYPE;
v_max_eff_date gipi_wpolbas.eff_date%TYPE;
v_eff_date gipi_wpolbas.eff_date%TYPE;
p_policy_id gipi_polbasic.policy_id%TYPE;
v_max_endt_seq_no gipi_wpolbas.endt_seq_no%TYPE;
v_max_endt_seq_no1 gipi_wpolbas.endt_seq_no%TYPE;
v_prorate gipi_itmperil.prem_rt%TYPE := 0;
amt_sw VARCHAR2(1); -- switch that will determine if amount is already
v_comp_prem gipi_polbasic.prem_amt%TYPE := 0; -- variable that will store computed prem
expired_sw VARCHAR2(1); -- switch that is used to determine if policy have short term endt.
-- fields that will be use in storing computed amounts when computing for the amount
-- of records with short term endorsement
v_ann_tsi2 gipi_polbasic.ann_tsi_amt%TYPE :=0;
v_ann_prem2 gipi_polbasic.ann_prem_amt%TYPE:=0;
var_expiry_date DATE;
v_end_of_transaction BOOLEAN;
CURSOR B(p_line_cd gipi_wpolbas.line_cd%TYPE,
p_type_cd gipi_wpolbas.type_cd%TYPE) IS
SELECT type_desc
FROM giis_policy_type
WHERE line_cd = p_line_cd
AND type_cd = p_type_cd;
BEGIN
var_expiry_date := GIPI_PACK_POLBASIC_PKG.extract_expiry(p_line_cd, p_subline_cd, p_iss_cd, p_issue_yy, p_pol_seq_no, p_renew_no);
--extract_expiry;
--*--
--by iris bordey
--07.11.2002
--fetch for acct_of_cd
-- get_acct_of_cd(:cg$ctrl.line_cd2,
-- :cg$ctrl.subline_cd2,
-- :cg$ctrl.iss_cd2,
-- :cg$ctrl.iss_yy2,
-- :cg$ctrl.pol_seq_no2,
-- :cg$ctrl.renew_no2);
FOR X IN (SELECT b2501.eff_date eff_date, b2501.pack_policy_id policy_id
FROM gipi_pack_polbasic b2501 --A.R.C. 07.26.2006
WHERE b2501.line_cd = p_line_cd
AND b2501.subline_cd = p_subline_cd
AND b2501.iss_cd = p_iss_cd
AND b2501.issue_yy = p_issue_yy
AND b2501.pol_seq_no = p_pol_seq_no
AND b2501.renew_no = p_renew_no
AND b2501.pol_flag IN ('1','2','3','X')
AND b2501.endt_seq_no = 0)
LOOP
v_eff_date := x.eff_date;
p_policy_id := x.policy_id;
EXIT;
END LOOP;
FOR W IN (SELECT MAX(endt_seq_no) endt_seq_no
FROM gipi_pack_polbasic b2501 --A.R.C. 07.26.2006
WHERE b2501.line_cd = p_line_cd
AND b2501.subline_cd = p_subline_cd
AND b2501.iss_cd = p_iss_cd
AND b2501.issue_yy = p_issue_yy
AND b2501.pol_seq_no = p_pol_seq_no
AND b2501.renew_no = p_renew_no
AND b2501.pol_flag IN ('1','2','3','X')
AND TRUNC(b2501.eff_date) <= TRUNC(nvl(p_eff_date,SYSDATE))
AND TRUNC(nvl(b2501.endt_expiry_date,b2501.expiry_date)) >= TRUNC(p_eff_date))
LOOP
v_max_endt_seq_no := w.endt_seq_no;
EXIT;
END LOOP;
IF v_max_endt_seq_no > 0 THEN
FOR G IN (SELECT MAX(endt_seq_no) endt_seq_no
FROM gipi_pack_polbasic b250 --A.R.C. 07.26.2006
WHERE b250.line_cd = p_line_cd
AND b250.subline_cd = p_subline_cd
AND b250.iss_cd = p_iss_cd
AND b250.issue_yy = p_issue_yy
AND b250.pol_seq_no = p_pol_seq_no
AND b250.renew_no = p_renew_no
AND b250.pol_flag IN ('1','2','3','X')
AND TRUNC(b250.eff_date) <= TRUNC(p_eff_date)
AND TRUNC(nvl(b250.endt_expiry_date,b250.expiry_date)) >= TRUNC(p_eff_date)
AND nvl(b250.back_stat,5) = 2)
LOOP
v_max_endt_seq_no1 := g.endt_seq_no;
EXIT;
END LOOP;
IF v_max_endt_seq_no != nvl(v_max_endt_seq_no1,-1) THEN
FOR Z IN (SELECT MAX(b2501.eff_date) eff_date
FROM gipi_pack_polbasic b2501 --A.R.C. 07.26.2006
WHERE b2501.line_cd = p_line_cd
AND b2501.subline_cd = p_subline_cd
AND b2501.iss_cd = p_iss_cd
AND b2501.issue_yy = p_issue_yy
AND b2501.pol_seq_no = p_pol_seq_no
AND b2501.renew_no = p_renew_no
AND b2501.pol_flag IN ('1','2','3','X')
AND TRUNC(b2501.eff_date) <= TRUNC(p_eff_date)
AND TRUNC(nvl(b2501.endt_expiry_date,b2501.expiry_date)) >= TRUNC(p_eff_date)
AND nvl(b2501.back_stat,5) = 2
AND b2501.endt_seq_no = v_max_endt_seq_no1)
LOOP
v_max_eff_date1 := z.eff_date;
EXIT;
END LOOP;
FOR Y IN (SELECT MAX(b2501.eff_date) eff_date
FROM gipi_pack_polbasic b2501 --A.R.C. 07.26.2006
WHERE b2501.line_cd = p_line_cd
AND b2501.subline_cd = p_subline_cd
AND b2501.iss_cd = p_iss_cd
AND b2501.issue_yy = p_issue_yy
AND b2501.pol_seq_no = p_pol_seq_no
AND b2501.renew_no = p_renew_no
AND b2501.pol_flag IN ('1','2','3','X')
AND b2501.endt_seq_no != 0
AND TRUNC(b2501.eff_date) <= TRUNC(p_eff_date)
AND TRUNC(nvl(b2501.endt_expiry_date,b2501.expiry_date)) >= TRUNC(p_eff_date)
AND nvl(b2501.back_stat,5)!= 2)
LOOP
v_max_eff_date2 := y.eff_date;
EXIT;
END LOOP;
v_max_eff_date := nvl(v_max_eff_date2,v_max_eff_date1);
ELSE
FOR C IN (SELECT MAX(b2501.eff_date) eff_date
FROM gipi_pack_polbasic b2501 --A.R.C. 07.26.2006
WHERE b2501.line_cd = p_line_cd
AND b2501.subline_cd = p_subline_cd
AND b2501.iss_cd = p_iss_cd
AND b2501.issue_yy = p_issue_yy
AND b2501.pol_seq_no = p_pol_seq_no
AND b2501.renew_no = p_renew_no
AND b2501.pol_flag IN ('1','2','3','X')
AND TRUNC(b2501.eff_date) <= TRUNC(p_eff_date)
AND TRUNC(nvl(b2501.endt_expiry_date,b2501.expiry_date)) >= TRUNC(p_eff_date)
AND nvl(b2501.back_stat,5) = 2
AND b2501.endt_seq_no = v_max_endt_seq_no1)
LOOP
v_max_eff_date1 := c.eff_date;
EXIT;
END LOOP;
v_max_eff_date := v_max_eff_date1;
END IF;
ELSE
v_max_eff_date := p_eff_date;
END IF;
--SYNCHRONIZE;
/*BETH 02152001 latest annualized amounts must be retrieved from the latest endt,
** for policy without endt yet latest annualized amount will be the amounts of
** policy record. For cases with short-term endt. annualized amount should be recomputed
** by adding up all policy/endt that is not yet expired
*/
--check first for the existance of short term endt.
expired_sw := 'N';
FOR SW IN(SELECT '1'
FROM GIPI_ITMPERIL A,
GIPI_POLBASIC C, --A.R.C. 07.26.2006
GIPI_PACK_POLBASIC B --A.R.C. 07.26.2006
WHERE B.line_cd = p_line_cd
AND B.subline_cd = p_subline_cd
AND B.iss_cd = p_iss_cd
AND B.issue_yy = p_issue_yy
AND B.pol_seq_no = p_pol_seq_no
AND B.renew_no = p_renew_no
AND B.pack_policy_id = c.pack_policy_id --A.R.C. 07.26.2006
AND c.policy_id = A.policy_id --A.R.C. 07.26.2006
AND B.pol_flag in('1','2','3','X')
AND (NVL(A.prem_amt,0) <> 0 OR NVL(A.tsi_amt,0) <> 0)
AND TRUNC(b.eff_date) <= TRUNC(P_eff_date)
AND TRUNC(nvl(b.endt_expiry_date, b.expiry_date)) <TRUNC(p_eff_date)
ORDER BY B.eff_date DESC)
LOOP
expired_sw := 'Y';
EXIT;
END LOOP;
--for policy with no expired_sw
IF expired_sw = 'N' THEN
--get the amount from the latest endt
amt_sw := 'N';
FOR AMT IN (SELECT b250.ann_tsi_amt, b250.ann_prem_amt
FROM gipi_pack_polbasic b250 --A.R.C. 07.26.2006
WHERE b250.line_cd = p_line_cd
AND b250.subline_cd = p_subline_cd
AND b250.iss_cd = p_iss_cd
AND b250.issue_yy = p_issue_yy
AND b250.pol_seq_no = p_pol_seq_no
AND b250.renew_no = p_renew_no
AND b250.pol_flag IN ('1','2','3','X')
AND NVL(b250.endt_seq_no, 0) > 0
AND b250.eff_date <= nvl(p_eff_date,SYSDATE)
ORDER BY b250.eff_date DESC, b250.endt_seq_no DESC )
LOOP
p_ann_tsi_amt := amt.ann_tsi_amt;
p_ann_prem_amt := amt.ann_prem_amt;
amt_sw := 'Y';
EXIT;
END LOOP;
--for policy without endt., get amounts from policy
IF amt_sw = 'N' THEN
FOR AMT IN (SELECT b250.ann_tsi_amt, b250.ann_prem_amt
FROM gipi_pack_polbasic b250 --A.R.C. 07.26.2006
WHERE b250.line_cd = p_line_cd
AND b250.subline_cd = p_subline_cd
AND b250.iss_cd = p_iss_cd
AND b250.issue_yy = p_issue_yy
AND b250.pol_seq_no = p_pol_seq_no
AND b250.renew_no = p_renew_no
AND b250.pol_flag IN ('1','2','3','X')
AND nvl(b250.endt_seq_no, 0) = 0)
LOOP
p_ann_tsi_amt := amt.ann_tsi_amt;
EXIT;
END LOOP;
END IF;
ELSE
--for policy with short term endt. amounts should be recomputed by adding up
--all policy and endt.
FOR A2 IN(SELECT (C.tsi_amt * A.currency_rt) tsi,
(C.prem_amt * a.currency_rt) prem,
B.eff_date, B.endt_expiry_date, B.expiry_date,
B.prorate_flag, NVL(B.comp_sw,'N') comp_sw,
B.short_rt_percent short_rt,
C.peril_cd, b.incept_date
FROM GIPI_ITEM A,
GIPI_POLBASIC D, --A.R.C. 07.26.2006
GIPI_PACK_POLBASIC B, --A.R.C. 07.26.2006
GIPI_ITMPERIL C
WHERE B.line_cd = p_line_cd
AND B.subline_cd = p_subline_cd
AND B.iss_cd = p_iss_cd
AND B.issue_yy = p_issue_yy
AND B.pol_seq_no = p_pol_seq_no
AND B.renew_no = p_renew_no
AND B.pack_policy_id = D.pack_policy_id --A.R.C. 07.26.2006
AND D.policy_id = A.policy_id --A.R.C. 07.26.2006
AND D.policy_id = C.policy_id --A.R.C. 07.26.2006
AND A.item_no = C.item_no
AND B.pol_flag IN ('1','2','3','X')
AND TRUNC(b.eff_date) <= DECODE(nvl(b.endt_seq_no,0),0,TRUNC(b.eff_date), TRUNC(p_eff_date))
-- AND TRUNC(NVL(B.endt_expiry_date,B.expiry_date)) >= TRUNC(:b540.eff_date)
AND TRUNC(DECODE(NVL(b.endt_expiry_date, b.expiry_date), b.expiry_date,
var_expiry_date, b.expiry_date,b.endt_expiry_date)) >= TRUNC(p_eff_date)
ORDER BY B.eff_date DESC)
LOOP
v_comp_prem := 0;
IF A2.prorate_flag = 1 THEN
IF A2.endt_expiry_date <= A2.eff_date THEN
p_msg_alert := 'Your endorsement expiry date is equal to or less than your effectivity date.'||
' Restricted condition.';
GOTO RAISE_FORM_TRIGGER_FAILURE;
ELSE
/*By Iris Bordey
**Removed add_months operation on computaton of v_prorate. Replaced
**it instead of variables.v_days (see check_duration) for short term endt.
*/
IF A2.comp_sw = 'Y' THEN
v_prorate := ((TRUNC( A2.endt_expiry_date) - TRUNC(A2.eff_date )) + 1 )/
check_duration(A2.incept_date, A2.expiry_date);
--(ADD_MONTHS(A2.incept_date,12) - A2.incept_date);
ELSIF A2.comp_sw = 'M' THEN
v_prorate := ((TRUNC( A2.endt_expiry_date) - TRUNC(A2.eff_date )) - 1 )/
check_duration(A2.incept_date, A2.expiry_date);
--(ADD_MONTHS(A2.incept_date,12) - A2.incept_date);
ELSE
v_prorate := (TRUNC( A2.endt_expiry_date) - TRUNC(A2.eff_date ))/
check_duration(A2.incept_date, A2.expiry_date);
--(ADD_MONTHS(A2.incept_date,12) - A2.incept_date);
END IF;
END IF;
v_comp_prem := A2.prem/v_prorate;
ELSIF A2.prorate_flag = 2 THEN
v_comp_prem := A2.prem;
ELSE
v_comp_prem := A2.prem/(A2.short_rt/100);
END IF;
v_ann_prem2 := v_ann_prem2 + v_comp_prem;
FOR TYPE IN(SELECT peril_type
FROM giis_peril
WHERE line_cd = p_line_cd
AND peril_cd = A2.peril_cd)
LOOP
IF type.peril_type = 'B' THEN
v_ann_tsi2 := v_ann_tsi2 + A2.tsi;
END IF;
END LOOP;
END LOOP;
p_ann_tsi_amt := v_ann_tsi2;
p_ann_prem_amt := v_ann_prem2;
END IF;
-- FOR A1 IN (SELECT b250.incept_date, b250.expiry_date,
-- b250.endt_expiry_date, b250.mortg_name, b250.prorate_flag,
-- b250.short_rt_percent, b250.prov_prem_tag, b250.prov_prem_pct,
-- b250.type_cd, b250.line_cd,
-- b250.ann_tsi_amt, b250.ann_prem_amt,
-- b250.foreign_acc_sw, b250.prem_warr_tag,
-- b250.expiry_tag, b250.incept_tag,
-- b250.reg_policy_sw, b250.co_insurance_sw,
-- b250.endt_expiry_tag, b250.manual_renew_no,
-- DECODE(b250.prorate_flag,'1',NVL(b250.comp_sw,'N')) comp_sw,
-- b250.cred_branch, b250.ref_pol_no
-- FROM gipi_pack_polbasic b250 --A.R.C. 07.26.2006
-- WHERE b250.line_cd = p_line_cd
-- AND b250.subline_cd = p_subline_cd
-- AND b250.iss_cd = p_iss_cd
-- AND b250.issue_yy = p_issue_yy
-- AND b250.pol_seq_no = p_pol_seq_no
-- AND b250.renew_no = p_renew_no
-- AND b250.pol_flag IN ('1','2','3','X')
-- AND b250.eff_date = v_max_eff_date
-- ORDER BY b250.endt_seq_no DESC )
-- LOOP
--
-- --beth 03212001 retrieved assured from latest endt
-- --search_for_assured2(tmp_assd_no, p_eff_date, p_line_cd, p_subline_cd, p_iss_cd, p_issue_yy, p_pol_seq_no, p_renew_no);
-- --beth 03212001 retrieved address from latest endt
-- --search_for_address2(tmp_add1, tmp_add2, tmp_add3);
-- tmp_incept_date := a1.incept_date;
-- tmp_expiry_date := a1.expiry_date;
-- tmp_endt_expiry_date := a1.endt_expiry_date;
--
-- tmp_mortg_name := a1.mortg_name;
-- tmp_prov_prem_tag := a1.prov_prem_tag;
-- tmp_prov_prem_pct := a1.prov_prem_pct;
-- tmp_prorate_flag := a1.prorate_flag;
-- tmp_short_rt_percent := a1.short_rt_percent;
-- tmp_type_cd := a1.type_cd;
-- tmp_ann_tsi_amt := a1.ann_tsi_amt;
-- tmp_ann_prem_amt := a1.ann_prem_amt;
--
-- tmp_govt_acc_sw := a1.foreign_acc_sw;
-- tmp_comp_sw := a1.comp_sw;
-- tmp_prem_warr_tag := a1.prem_warr_tag;
--
-- tmp_expiry_tag := a1.expiry_tag;
-- tmp_endt_expiry_tag := a1.endt_expiry_tag;
-- tmp_incept_tag := a1.incept_tag;
-- tmp_reg_policy_sw := a1.reg_policy_sw;
-- tmp_co_insurance_sw := a1.co_insurance_sw;
-- tmp_manual_renew_no := a1.manual_renew_no;
-- tmp_cred_branch := a1.cred_branch;
-- tmp_ref_pol_no := a1.ref_pol_no;
--
---- FOR B1 IN B(a1.line_cd, a1.type_cd)
---- LOOP
---- :b540.dsp_type_cd := b1.type_desc;
---- EXIT;
---- END LOOP;
-- EXIT;
-- END LOOP;
-- FOR C1 IN (SELECT assd_name
-- FROM giis_assured
-- WHERE assd_no = tmp_assd_no)
-- LOOP
-- :b240.assd_no := tmp_assd_no;
-- :b240.drv_assd_no := c1.assd_name;
-- EXIT;
-- END LOOP;
--
-- FOR X IN (SELECT iss_name
-- FROM giis_issource
-- WHERE iss_cd = tmp_cred_branch)
-- LOOP
-- :b540.dsp_cred_branch := x.iss_name;
-- EXIT;
-- END LOOP;
--
-- :b540.incept_tag := tmp_incept_tag;
-- :b540.expiry_tag := tmp_expiry_tag;
-- :b540.endt_expiry_tag := tmp_endt_expiry_tag;
-- :b540.endt_expiry_date := NVL(tmp_endt_expiry_date, tmp_expiry_date);
-- :b540.type_cd := tmp_type_cd;
-- :b540.same_polno_sw := 'N';
--
-- :b540.foreign_acc_sw := nvl(tmp_govt_acc_sw,'N');
-- :b540.comp_sw := tmp_comp_sw;
-- :b540.prem_warr_tag := tmp_prem_warr_tag;
-- :b240.assd_no := tmp_assd_no;
-- :b540.old_assd_no := tmp_assd_no;
-- :b540.old_address1 := tmp_add1;
-- :b540.old_address2 := tmp_add2;
-- :b540.old_address3 := tmp_add3;
-- :b240.address1 := tmp_add1;
-- :b240.address2 := tmp_add2;
-- :b240.address3 := tmp_add3;
-- :b540.reg_policy_sw := nvl(tmp_reg_policy_sw,'Y');
-- :b540.co_insurance_sw := nvl(tmp_co_insurance_sw,'1');
-- :b540.manual_renew_no := tmp_manual_renew_no;
-- :b540.cred_branch := tmp_cred_branch;
-- --BETH 120699
-- :b540.booking_mth := NULL;
-- :b540.booking_year := NULL;
--
-- IF tmp_prorate_flag = '3' THEN
-- :b540.prorate_flag := '3';
-- :b540.short_rt_percent := tmp_short_rt_percent;
-- ELSIF tmp_prorate_flag = '2' THEN
-- :b540.prorate_flag := '2';
-- :b540.short_rt_percent := NULL;
-- ELSE
-- :b540.prorate_flag := '1';
-- :B540.short_rt_percent := NULL;
-- END IF;
--
-- :b360.endt_text01 := NULL;
-- :b360.endt_text02 := NULL;
-- :b360.endt_text03 := NULL;
-- :b360.endt_text04 := NULL;
-- :b360.endt_text05 := NULL;
-- :b360.endt_text06 := NULL;
-- :b360.endt_text07 := NULL;
-- :b360.endt_text08 := NULL;
-- :b360.endt_text09 := NULL;
-- :b360.endt_text10 := NULL;
-- :b360.endt_text11 := NULL;
-- :b360.endt_text12 := NULL;
-- :b360.endt_text13 := NULL;
-- :b360.endt_text14 := NULL;
-- :b360.endt_text15 := NULL;
-- :b360.endt_text16 := NULL;
-- :b360.endt_text17 := NULL;
-- :b360.endt_text := NULL;
-- :b360.dsp_endt_text := NULL;
-- :b550.gen_info01 := NULL;
-- :b550.gen_info02 := NULL;
-- :b550.gen_info03 := NULL;
-- :b550.gen_info04 := NULL;
-- :b550.gen_info05 := NULL;
-- :b550.gen_info06 := NULL;
-- :b550.gen_info07 := NULL;
-- :b550.gen_info08 := NULL;
-- :b550.gen_info09 := NULL;
-- :b550.gen_info10 := NULL;
-- :b550.gen_info11 := NULL;
-- :b550.gen_info12 := NULL;
-- :b550.gen_info13 := NULL;
-- :b550.gen_info14 := NULL;
-- :b550.gen_info15 := NULL;
-- :b550.gen_info16 := NULL;
-- :b550.gen_info17 := NULL;
-- :b550.gen_info := NULL;
-- :b550.dsp_gen_info := NULL;
-- :b360.endt_tax := 'N';
-- :parameter.v_endt := 'N';--switch to prevent the post-forms-commit trigger to fire
--
-- IF trunc(:b540.endt_expiry_date) < trunc(:b540.expiry_date) AND
-- TRUNC(NVL(variables.v_old_date_eff,SYSDATE)) != TRUNC(:b540.eff_date)THEN
-- :parameter.confirm_sw := 'Y';
-- ELSE
-- :parameter.confirm_sw := 'N';
-- END IF;
--
-- --beth 03132000 store derived assured name
-- variables.v_ext_assd := :b240.drv_assd_no;
--
-- CLEAR_MESSAGE;
--
-- variables.v_old_date_eff := NULL;
v_end_of_transaction := TRUE;
<<RAISE_FORM_TRIGGER_FAILURE>>
IF v_end_of_transaction THEN
p_success := TRUE;
END IF;
END;
/
|
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 29-12-2019 a las 01:19:40
-- Versión del servidor: 10.3.15-MariaDB
-- Versión de PHP: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Base de datos: `gestordeclaves`
--
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `cuentas`
--
CREATE TABLE `cuentas` (
`idCuentaUser` int(11) NOT NULL,
`Plataforma` varchar(200) NOT NULL,
`URL` varchar(500) NOT NULL,
`Password` varchar(400) NOT NULL,
`Comentario` varchar(200) NOT NULL,
`idUser` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `cuentas`
--
INSERT INTO `cuentas` (`idCuentaUser`, `Plataforma`, `URL`, `Password`, `Comentario`, `idUser`) VALUES
(36, 'Facebook', 'www.facebook.com', 'RMCLm82-YL', 'Red social', 45),
(78, 'wqrqeerq', 'qerqerq', '12345', 'qerqerqe', 45),
(80, 'juanito10', 'elitemagician01@gmail.com', '1231343', 'qwrqwrqe', 46),
(81, 'juanito10', 'elitemagician01@gmail.com', '13113', '121221', 46);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `logsistema`
--
CREATE TABLE `logsistema` (
`idLog` int(11) NOT NULL,
`Fecha` date NOT NULL,
`Hora` time NOT NULL,
`Descripcion` text NOT NULL,
`idUser` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `logsistema`
--
INSERT INTO `logsistema` (`idLog`, `Fecha`, `Hora`, `Descripcion`, `idUser`) VALUES
(65, '2019-11-28', '13:55:45', 'ENTRADA', 45),
(66, '2019-11-28', '13:59:59', 'NUEVA CUENTA', 45),
(67, '2019-11-28', '14:00:07', 'CONSULTA', 45),
(68, '2019-11-28', '14:01:51', 'NUEVA CUENTA', 45),
(69, '2019-11-28', '14:08:06', 'ENTRADA', 46),
(70, '2019-11-28', '14:13:20', 'ENTRADA', 46),
(71, '2019-11-28', '14:15:16', 'NUEVA CUENTA', 46),
(72, '2019-11-28', '14:15:30', 'CONSULTA', 46),
(73, '2019-11-28', '14:16:26', 'CONSULTA', 46),
(74, '2019-12-01', '18:43:55', 'CONSULTA', 46),
(75, '2019-12-03', '19:16:30', 'ENTRADA', 45),
(76, '2019-12-03', '19:17:45', 'NUEVA CUENTA', 45),
(77, '2019-12-03', '19:17:51', 'CONSULTA', 45),
(78, '2019-12-04', '12:11:45', 'CONSULTA', 45),
(79, '2019-12-04', '12:12:56', 'ENTRADA', 45),
(80, '2019-12-04', '12:13:09', 'CONSULTA', 45),
(81, '2019-12-04', '20:42:08', 'NUEVA CUENTA', 46),
(82, '2019-12-04', '20:42:33', 'NUEVA CUENTA', 46),
(83, '2019-12-04', '20:58:58', 'NUEVA CUENTA', 46),
(84, '2019-12-04', '21:35:24', 'NUEVA CUENTA', 46),
(85, '2019-12-04', '21:35:44', 'NUEVA CUENTA', 46),
(86, '2019-12-05', '09:22:13', 'NUEVA CUENTA', 46),
(87, '2019-12-05', '09:22:36', 'NUEVA CUENTA', 46),
(88, '2019-12-05', '09:41:32', 'NUEVA CUENTA', 46),
(89, '2019-12-05', '09:45:43', 'NUEVA CUENTA', 46),
(90, '2019-12-05', '09:47:35', 'NUEVA CUENTA', 46),
(91, '2019-12-05', '09:47:37', 'NUEVA CUENTA', 46),
(92, '2019-12-05', '09:50:08', 'NUEVA CUENTA', 46),
(93, '2019-12-05', '09:50:29', 'NUEVA CUENTA', 46),
(94, '2019-12-05', '09:54:24', 'NUEVA CUENTA', 46),
(95, '2019-12-05', '09:54:52', 'NUEVA CUENTA', 46),
(96, '2019-12-05', '10:19:14', 'NUEVA CUENTA', 46),
(97, '2019-12-05', '10:19:41', 'NUEVA CUENTA', 46),
(98, '2019-12-05', '10:20:04', 'NUEVA CUENTA', 46),
(99, '2019-12-05', '10:26:18', 'NUEVA CUENTA', 46),
(100, '2019-12-05', '10:26:39', 'NUEVA CUENTA', 46),
(101, '2019-12-05', '10:36:33', 'NUEVA CUENTA', 46),
(102, '2019-12-05', '10:54:21', 'NUEVA CUENTA', 46),
(103, '2019-12-05', '10:55:11', 'NUEVA CUENTA', 46),
(104, '2019-12-05', '11:52:21', 'NUEVA CUENTA', 46),
(105, '2019-12-05', '11:52:36', 'NUEVA CUENTA', 46),
(106, '2019-12-05', '12:32:01', 'NUEVA CUENTA', 46),
(107, '2019-12-05', '12:32:54', 'NUEVA CUENTA', 46);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `usuarios`
--
CREATE TABLE `usuarios` (
`idUser` int(11) NOT NULL,
`Correo` varchar(100) NOT NULL,
`Password` varchar(400) NOT NULL,
`Username` varchar(100) NOT NULL,
`Telefono` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `usuarios`
--
INSERT INTO `usuarios` (`idUser`, `Correo`, `Password`, `Username`, `Telefono`) VALUES
(45, 'oscar@gmail.com', '$2y$10$EdWcmo3hCxzAD.2yWx2I9.AzKgWU/CInL8fgGQCowJMU6I4XWcc5y', 'OscarJ ', '2281329157'),
(46, 'elizabeth@hotmail.com', '$2y$10$hlx2ZWLUYiir48TeM5Q7k.0G6VZEG6IFedlSX/giK3XKaXnA5.LqO', 'elizabeth', '2281329157');
--
-- Índices para tablas volcadas
--
--
-- Indices de la tabla `cuentas`
--
ALTER TABLE `cuentas`
ADD PRIMARY KEY (`idCuentaUser`),
ADD KEY `idUser` (`idUser`);
--
-- Indices de la tabla `logsistema`
--
ALTER TABLE `logsistema`
ADD PRIMARY KEY (`idLog`),
ADD KEY `idUser` (`idUser`);
--
-- Indices de la tabla `usuarios`
--
ALTER TABLE `usuarios`
ADD PRIMARY KEY (`idUser`);
--
-- AUTO_INCREMENT de las tablas volcadas
--
--
-- AUTO_INCREMENT de la tabla `cuentas`
--
ALTER TABLE `cuentas`
MODIFY `idCuentaUser` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=82;
--
-- AUTO_INCREMENT de la tabla `logsistema`
--
ALTER TABLE `logsistema`
MODIFY `idLog` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=108;
--
-- AUTO_INCREMENT de la tabla `usuarios`
--
ALTER TABLE `usuarios`
MODIFY `idUser` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=47;
--
-- Restricciones para tablas volcadas
--
--
-- Filtros para la tabla `cuentas`
--
ALTER TABLE `cuentas`
ADD CONSTRAINT `cuentas_ibfk_1` FOREIGN KEY (`idUser`) REFERENCES `usuarios` (`idUser`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Filtros para la tabla `logsistema`
--
ALTER TABLE `logsistema`
ADD CONSTRAINT `idUser` FOREIGN KEY (`idUser`) REFERENCES `usuarios` (`idUser`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
DROP TABLE `x2_docs`;
DELETE FROM `x2_modules` WHERE name='docs'; |
-- 研发人员 角色
-- 42 97 99 124 155 158 159 160 161 162 164 168 175 187 190 193 195 197
INSERT INTO t_role VALUES(40,'研发人员');
INSERT INTO t_emp_role VALUES(42, 40);
INSERT INTO t_emp_role VALUES(97, 40);
INSERT INTO t_emp_role VALUES(99, 40);
INSERT INTO t_emp_role VALUES(124, 40);
INSERT INTO t_emp_role VALUES(155, 40);
INSERT INTO t_emp_role VALUES(158, 40);
INSERT INTO t_emp_role VALUES(159, 40);
INSERT INTO t_emp_role VALUES(160, 40);
INSERT INTO t_emp_role VALUES(161, 40);
INSERT INTO t_emp_role VALUES(162, 40);
INSERT INTO t_emp_role VALUES(164, 40);
INSERT INTO t_emp_role VALUES(168, 40);
INSERT INTO t_emp_role VALUES(175, 40);
INSERT INTO t_emp_role VALUES(187, 40);
INSERT INTO t_emp_role VALUES(190, 40);
INSERT INTO t_emp_role VALUES(193, 40);
INSERT INTO t_emp_role VALUES(195, 40);
INSERT INTO t_emp_role VALUES(197, 40);
-- 2 36 37 84 156 172 174 178 181 188 200
INSERT INTO t_emp_role VALUES(2, 40);
INSERT INTO t_emp_role VALUES(36, 40);
INSERT INTO t_emp_role VALUES(37, 40);
INSERT INTO t_emp_role VALUES(84, 40);
INSERT INTO t_emp_role VALUES(156, 40);
INSERT INTO t_emp_role VALUES(172, 40);
INSERT INTO t_emp_role VALUES(174, 40);
INSERT INTO t_emp_role VALUES(178, 40);
INSERT INTO t_emp_role VALUES(181, 40);
INSERT INTO t_emp_role VALUES(188, 40);
INSERT INTO t_emp_role VALUES(200, 40);
-- 41 43 46 55 65 70 109
INSERT INTO t_emp_role VALUES(41, 40);
INSERT INTO t_emp_role VALUES(43, 40);
INSERT INTO t_emp_role VALUES(46, 40);
INSERT INTO t_emp_role VALUES(55, 40);
INSERT INTO t_emp_role VALUES(65, 40);
INSERT INTO t_emp_role VALUES(70, 40);
INSERT INTO t_emp_role VALUES(109, 40);
-- 14 15 21 24 26 91 104 105 153 173 186
INSERT INTO t_emp_role VALUES(14, 40);
INSERT INTO t_emp_role VALUES(15, 40);
INSERT INTO t_emp_role VALUES(21, 40);
INSERT INTO t_emp_role VALUES(24, 40);
INSERT INTO t_emp_role VALUES(26, 40);
INSERT INTO t_emp_role VALUES(91, 40);
INSERT INTO t_emp_role VALUES(104, 40);
INSERT INTO t_emp_role VALUES(105, 40);
INSERT INTO t_emp_role VALUES(153, 40);
INSERT INTO t_emp_role VALUES(173, 40);
INSERT INTO t_emp_role VALUES(186, 40);
-- 69 76 108 112 132 138 139 154 183 184 185
INSERT INTO t_emp_role VALUES(69, 40);
INSERT INTO t_emp_role VALUES(76, 40);
INSERT INTO t_emp_role VALUES(108, 40);
INSERT INTO t_emp_role VALUES(112, 40);
INSERT INTO t_emp_role VALUES(132, 40);
INSERT INTO t_emp_role VALUES(138, 40);
INSERT INTO t_emp_role VALUES(139, 40);
INSERT INTO t_emp_role VALUES(154, 40);
INSERT INTO t_emp_role VALUES(183, 40);
INSERT INTO t_emp_role VALUES(184, 40);
INSERT INTO t_emp_role VALUES(185, 40);
-- 35 177 189 196
INSERT INTO t_emp_role VALUES(35, 40);
INSERT INTO t_emp_role VALUES(177, 40);
INSERT INTO t_emp_role VALUES(189, 40);
INSERT INTO t_emp_role VALUES(196, 40);
-- 28 74 113 118 137 167 182
INSERT INTO t_emp_role VALUES(28, 40);
INSERT INTO t_emp_role VALUES(74, 40);
INSERT INTO t_emp_role VALUES(113, 40);
INSERT INTO t_emp_role VALUES(118, 40);
INSERT INTO t_emp_role VALUES(137, 40);
INSERT INTO t_emp_role VALUES(167, 40);
INSERT INTO t_emp_role VALUES(182, 40);
-- 45 194 202
INSERT INTO t_emp_role VALUES(45, 40);
INSERT INTO t_emp_role VALUES(194, 40);
INSERT INTO t_emp_role VALUES(202, 40);
INSERT INTO t_emp_role VALUES(148, 40);
INSERT INTO `t_menu` VALUES ('310', '112', '印章申请信息管理', 'web/oa/seal/sealManage', '2', null);
INSERT INTO t_emp_role VALUES (310,33);
alter table t_seal_else modify status INT(1) default 1 COMMENT '状态'
alter table t_materia_purchase add projectCode varchar(225) COMMENT '项目名称';
alter table t_seal_apply add wdr varchar(10) COMMENT '外带人';
-- 更新 applicationContext.xml
-- 注入mailTableUtil 和 添加定时任务
INSERT INTO t_role VALUES (35,'产品运营经理');
-- 设置角色人员
INSERT INTO t_emp_role VALUES (35,35);
INSERT INTO t_role_menu VALUES (35,311);
INSERT INTO t_role_menu VALUES (35,312);
INSERT INTO t_role_menu VALUES (35,313);
-- 给ljchenOA管理权限
INSERT INTO `t_menu` VALUES ('314', '112', '物料采购处理', 'web/oa/materia_v2/dealPurchaseList', '14', null);
INSERT INTO `t_menu` VALUES ('315', '112', '物料入库处理', 'web/oa/materia_v2/dealInwareList', '14', null);
INSERT INTO t_role_menu VALUES (23,314);
INSERT INTO t_role_menu VALUES (23,315);
INSERT INTO t_role_menu VALUES (23,14);
update t_menu set url = 'web/oa/deal' where id = 14;
alter table t_mt modify materiaCode varchar(20) not null;
INSERT INTO `t_menu` VALUES ('350', '112', '物料入库检验', 'web/oa/materia_v2/checkInbound', '14', null);
INSERT INTO t_role_menu VALUES (40,350);
INSERT INTO t_role_menu VALUES (40,14);
-- 未更新
-- seq表增加id
INSERT INTO t_seal_date VALUES(10,'12时00分',-1,1);
CREATE TABLE t_menu_permission(
id int auto_increment PRIMARY KEY,
menu_id int NOT NULL COMMENT '菜单名称',
menu_name VARCHAR(20) NOT NULL COMMENT '菜单名称',
role_id int NOT NULL COMMENT '角色id',
role_name VARCHAR(20) NOT NULL COMMENT '角色名称',
url VARCHAR(100) NOT NULL COMMENT '页面地址',
status int(1) default 1 COMMENT '状态'
);
--- 物料缓存
CREATE TABLE t_materia_cache(
id INT PRIMARY KEY AUTO_INCREMENT COMMENT 'id',
apply_code VARCHAR(20) NOT NULL COMMENT '申请编号',
materia_id INT NOT NULL COMMENT '物料id',
num DOUBLE NOT NULL COMMENT '数量',
warehouse_id INT NOT NULL COMMENT '仓库id',
status INT(1) default 1 COMMENT '状态'
);
-- 物料报废申请
INSERT INTO `t_menu` VALUES (351, '112', '物料报废申请', 'web/oa/materia_v2/reject', 4, null);
INSERT INTO `t_menu` VALUES (352, '112', '物料报废审批', 'web/oa/materia_v2/rejectApprove', 5, null);
INSERT INTO t_role_menu VALUES (27, 351);
INSERT INTO t_role_menu VALUES (4, 352);
-- 更新菜单
update t_menu set pid = 2 where name in
('角色管理', '添加员工', '员工列表', '权限设置', '外网访问', '物料入库', '考勤导入','添加固定资产',
'日历设置', '年假损益', '请假注销', '考勤导出', '出差注销', '固定资产管理', '客户信息管理',
'产品信息管理', '办公用品库存', '应急药品库存');
update t_menu set pid = 14 where name in ('物料申领处理', '物料入库处理', '返料入库处理', '办公用品申领处理',
'应急药品申领处理', '固定资产发放', '固定资产归还', '固定资产转移', '固定资产维修', '固定资产注销',
'固定资产采购', '产品出库', '办公用品采购处理', '应急药品采购处理');
update t_menu set pid = 222 where name in ('物料入库查询', '物料消耗查询', '物料库存查询', '产品库存查询',
'考勤查询', '打卡查询', '年假查询', '办公用品消耗查询', '应急药品消耗查询', '固定资产查询');
--给角色添加OA管理、OA处理、OA查询页面
INSERT INTO t_role_menu VALUES (1 , 2);
INSERT INTO t_role_menu VALUES (30 , 2);
INSERT INTO t_role_menu VALUES (31 , 2);
INSERT INTO t_role_menu VALUES (37 , 2);
INSERT INTO t_role_menu VALUES (37 , 14);
INSERT INTO t_role_menu VALUES (17 , 2);
INSERT INTO t_role_menu VALUES (27 , 2);
INSERT INTO t_role_menu VALUES (27 , 14);
INSERT INTO t_role_menu VALUES (6 , 2);
INSERT INTO t_role_menu VALUES (6 , 14);
INSERT INTO t_role_menu VALUES (6 , 222);
INSERT INTO t_role_menu VALUES (15 , 2);
INSERT INTO t_role_menu VALUES (15 , 14);
INSERT INTO t_role_menu VALUES (15 , 222);
INSERT INTO t_role_menu VALUES (9 , 2);
INSERT INTO t_role_menu VALUES (9 , 14);
INSERT INTO t_role_menu VALUES (1 , 222);
INSERT INTO t_role_menu VALUES (2 , 222);
INSERT INTO t_role_menu VALUES (4 , 222);
INSERT INTO t_role_menu VALUES (21 , 14);
-- 删除不用的菜单
-- 3 员工管理, 6 物料管理, 17 考勤管理, 42 资产管理, 102 产品管理
delete from t_role_menu where menuId in (3, 6, 17, 42, 102);
-- ----------------------------
-- Records of t_menu_permission
-- ----------------------------
INSERT INTO `t_menu_permission` VALUES ('1', '2', 'OA管理', '33', '印章管理员', '/web/oa/seal/manage', '1');
INSERT INTO `t_menu_permission` VALUES ('2', '2', 'OA管理', '30', '产品发货人员', '/web/oa/product/logistics', '1');
INSERT INTO `t_menu_permission` VALUES ('3', '2', 'OA管理', '35', '产品运营经理', '/web/oa/merchandise/manage/supplier', '1');
INSERT INTO `t_menu_permission` VALUES ('4', '14', 'OA处理', '33', '印章管理员', '/web/oa/seal/sealDeal', '1');
INSERT INTO `t_menu_permission` VALUES ('5', '14', 'OA处理', '23', '物料采购员', '/web/oa/materia_v2/dealPurchaseList', '1');
INSERT INTO `t_menu_permission` VALUES ('6', '14', 'OA处理', '40', '研发人员', '/web/oa/materia_v2/checkInbound', '1');
INSERT INTO `t_menu_permission` VALUES ('7', '222', 'OA查询', '40', '研发人员', '/web/oa/materia_v2/query', '1');
INSERT INTO `t_menu_permission` VALUES ('8', '222', 'OA查询', '35', '产品运营经理', '/web/oa/merchandise/search', '1');
INSERT INTO `t_menu_permission` VALUES ('9', '2', 'OA管理', '37', '产品仓库管理员', '/web/oa/merchandise/manage/stockReason', '1');
INSERT INTO `t_menu_permission` VALUES ('10', '2', 'OA管理', '1', '总经理', '/web/oa/role/mgr', '1');
INSERT INTO `t_menu_permission` VALUES ('11', '2', 'OA管理', '17', '员工管理', '/web/oa/user/add', '1');
INSERT INTO `t_menu_permission` VALUES ('12', '2', 'OA管理', '27', '新版仓库管理员', '/web/oa/materia_v2/addmt', '1');
INSERT INTO `t_menu_permission` VALUES ('13', '2', 'OA管理', '6', '考勤管理员', '/web/oa/date/mgr', '1');
INSERT INTO `t_menu_permission` VALUES ('14', '2', 'OA管理', '9', '固定资产管理员', '/web/oa/prop/mgr', '1');
INSERT INTO `t_menu_permission` VALUES ('15', '2', 'OA管理', '31', '生产运营经理', '/web/oa/product/receiver/list', '1');
INSERT INTO `t_menu_permission` VALUES ('16', '2', 'OA管理', '15', '办公用品管理员', '/web/oa/os/stock', '1');
INSERT INTO `t_menu_permission` VALUES ('18', '14', 'OA处理', '15', '办公用品管理员', '/web/oa/os/sqList', '1');
INSERT INTO `t_menu_permission` VALUES ('19', '14', 'OA处理', '27', '新版仓库管理员', '/web/oa/materia_v2/maApplyList2', '1');
INSERT INTO `t_menu_permission` VALUES ('20', '14', 'OA处理', '9', '固定资产管理员', '/web/oa/prop/ff', '1');
INSERT INTO `t_menu_permission` VALUES ('21', '14', 'OA处理', '21', '仓库管理员', '/web/oa/product/outstock/list', '1');
INSERT INTO `t_menu_permission` VALUES ('22', '222', 'OA查询', '1', '总经理', '/web/oa/kq/list', '1');
INSERT INTO `t_menu_permission` VALUES ('23', '222', 'OA查询', '2', '技术总监', '/web/oa/kq/list', '1');
INSERT INTO `t_menu_permission` VALUES ('24', '222', 'OA查询', '4', '部门主管', '/web/oa/kq/list', '1');
INSERT INTO `t_menu_permission` VALUES ('25', '222', 'OA查询', '15', '办公用品管理员', '/web/oa/os/seach', '1');
INSERT INTO `t_menu_permission` VALUES ('26', '222', 'OA查询', '9', '固定资产管理员', '/web/oa/prop/search', '1');
INSERT INTO `t_menu_permission` VALUES ('27', '2', 'OA管理', '1', '总经理', '/web/oa/index', '-1');
-- 制版管理员Oa审批页面换位加工处理页面 13
-- 删除资产采购员审批页面 固定资产管理员
INSERT INTO `t_menu` VALUES (354, '112', '外协加工处理', 'web/oa/lab/myPcbSp3', 14, null);
update t_menu set url = 'web/oa/lab/wxSq' where name = '加工申请';
-- 芯片管理员审批页面换芯片申请处理页面 18
INSERT INTO `t_menu` VALUES (355, '112', '芯片申请处理', 'web/oa/os/siliconApprove2', 14, null);
-- 配置文件中清理印章定时任务未设置
|
select
AppGeneralSetting.Language
from
AppGeneralSetting
where
AppGeneralSetting.Generation = (
select
MAX(AppGeneralSetting.Generation)
from
AppGeneralSetting
)
|
insert into user(id, username, name, age, balance) values(1, 'user1', '张一', 17, 100.00);
insert into user(id, username, name, age, balance) values(2, 'user2', '张二', 18, 120.00);
insert into user(id, username, name, age, balance) values(3, 'user3', '张三', 19, 130.00);
insert into user(id, username, name, age, balance) values(4, 'user4', '张四', 20, 140.00); |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 04-07-2017 a las 22:10:46
-- Versión del servidor: 10.1.21-MariaDB
-- Versión de PHP: 5.6.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Base de datos: `naturvida`
--
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `clientes`
--
CREATE TABLE `clientes` (
`id` int(11) NOT NULL,
`cedula` int(12) NOT NULL,
`nombre` varchar(60) NOT NULL,
`direccion` varchar(50) NOT NULL,
`telefono` varchar(15) NOT NULL,
`correo` varchar(60) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `clientes`
--
INSERT INTO `clientes` (`id`, `cedula`, `nombre`, `direccion`, `telefono`, `correo`) VALUES
(1, 4567890, 'Luis Carlos Carmona', 'Calle falsa 123', '7777777777', 'luis@hotmail.com'),
(2, 1144467890, 'Maria Isabel Romo', 'Calle 100 # 45-09', '3245678921', 'mariaisa@yahoo.es'),
(3, 1144047235, 'Juan', 'Bedoya Ramirez', '3124567843', 'juanbedoya@gmail.com');
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `facturas`
--
CREATE TABLE `facturas` (
`id` int(11) NOT NULL,
`fecha` date NOT NULL,
`cliente_id` int(12) NOT NULL,
`valor_total` int(12) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `facturas`
--
INSERT INTO `facturas` (`id`, `fecha`, `cliente_id`, `valor_total`) VALUES
(2, '2017-07-05', 1, 50000),
(3, '2017-07-04', 1, 40000),
(4, '2017-07-04', 1, 60000),
(5, '2017-07-04', 2, 40000),
(6, '2017-07-04', 1, 20000),
(7, '2017-07-04', 1, 40000),
(8, '2017-07-04', 2, 690000),
(9, '2017-07-04', 3, 2340000);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `factura_detalle`
--
CREATE TABLE `factura_detalle` (
`id` int(11) NOT NULL,
`factura_id` int(12) NOT NULL,
`producto_id` int(12) NOT NULL,
`cantidad` int(12) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `factura_detalle`
--
INSERT INTO `factura_detalle` (`id`, `factura_id`, `producto_id`, `cantidad`) VALUES
(1, 4, 4, 3),
(2, 5, 4, 2),
(3, 6, 4, 1),
(4, 7, 4, 2),
(5, 8, 5, 3),
(6, 9, 6, 1);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `productos`
--
CREATE TABLE `productos` (
`id` int(11) NOT NULL,
`codigo` int(12) NOT NULL,
`descripcion` varchar(60) NOT NULL,
`valor` int(12) NOT NULL,
`cantidad_inicial` int(12) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `productos`
--
INSERT INTO `productos` (`id`, `codigo`, `descripcion`, `valor`, `cantidad_inicial`) VALUES
(4, 3456, 'Tinte para el cabello', 20000, 120),
(5, 1234, 'Shampoo cabello', 230000, 46),
(6, 234, 'kit de Belleza', 2340000, 12);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `users`
--
CREATE TABLE `users` (
`id` int(11) NOT NULL,
`usuario` varchar(60) NOT NULL,
`contraseña` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Volcado de datos para la tabla `users`
--
INSERT INTO `users` (`id`, `usuario`, `contraseña`) VALUES
(1, 'Rod Software', '1234567890'),
(2, 'ADSI Technology', '0987654321');
--
-- Índices para tablas volcadas
--
--
-- Indices de la tabla `clientes`
--
ALTER TABLE `clientes`
ADD PRIMARY KEY (`id`);
--
-- Indices de la tabla `facturas`
--
ALTER TABLE `facturas`
ADD PRIMARY KEY (`id`),
ADD KEY `cliente_id` (`cliente_id`);
--
-- Indices de la tabla `factura_detalle`
--
ALTER TABLE `factura_detalle`
ADD PRIMARY KEY (`id`),
ADD KEY `numero` (`factura_id`),
ADD KEY `producto_id` (`producto_id`);
--
-- Indices de la tabla `productos`
--
ALTER TABLE `productos`
ADD PRIMARY KEY (`id`),
ADD KEY `codigo` (`codigo`);
--
-- Indices de la tabla `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT de las tablas volcadas
--
--
-- AUTO_INCREMENT de la tabla `clientes`
--
ALTER TABLE `clientes`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT de la tabla `facturas`
--
ALTER TABLE `facturas`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT de la tabla `factura_detalle`
--
ALTER TABLE `factura_detalle`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT de la tabla `productos`
--
ALTER TABLE `productos`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT de la tabla `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- Restricciones para tablas volcadas
--
--
-- Filtros para la tabla `facturas`
--
ALTER TABLE `facturas`
ADD CONSTRAINT `facturas_ibfk_3` FOREIGN KEY (`cliente_id`) REFERENCES `clientes` (`id`);
--
-- Filtros para la tabla `factura_detalle`
--
ALTER TABLE `factura_detalle`
ADD CONSTRAINT `factura_detalle_ibfk_1` FOREIGN KEY (`producto_id`) REFERENCES `productos` (`id`),
ADD CONSTRAINT `factura_detalle_ibfk_2` FOREIGN KEY (`factura_id`) REFERENCES `facturas` (`id`);
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
ALTER TABLE WorkFlow_DocShow ADD docMouldID integer
/ |
alter table cowork_types rename column managerid to manageridtemp
/
alter table cowork_types add managerid clob
/
alter table cowork_types rename column members to memberstemp
/
alter table cowork_types add members clob
/
declare
id_1 integer;
manageridtemp_1 varchar2(4000);
memberstemp_1 varchar2(4000);
managerid_clob clob;
members_clob clob;
begin
for c1 IN (select id,manageridtemp,memberstemp from cowork_types) loop
DBMS_lob.CREATETEMPORARY(managerid_clob,TRUE);
DBMS_lob.CREATETEMPORARY(members_clob,TRUE);
id_1 :=c1.id;
manageridtemp_1 :=to_char(','||c1.manageridtemp||',');
memberstemp_1 :=to_char(','||c1.memberstemp||',');
dbms_lob.write(managerid_clob,length(manageridtemp_1),1,manageridtemp_1);
dbms_lob.write(members_clob,length(memberstemp_1),1,memberstemp_1);
update cowork_types set managerid=managerid_clob,members=members_clob where id=id_1;
end loop;
end;
/
alter table cowork_types drop column manageridtemp
/
alter table cowork_types drop column memberstemp
/
alter table cowork_items rename column coworkers to coworkerstemp
/
alter table cowork_items add coworkers clob
/
alter table cowork_items rename column readers to readerstemp
/
alter table cowork_items add readers clob
/
alter table cowork_items rename column isnew to isnewtemp
/
alter table cowork_items add isnew clob
/
declare
id_1 integer;
coworkerstemp_1 varchar2(4000);
readerstemp_1 varchar2(4000);
isnewtemp_1 varchar2(4000);
coworkers_clob clob;
readers_clob clob;
isnew_clob clob;
begin
for c1 IN (select id,coworkerstemp,readerstemp,isnewtemp from cowork_items) loop
DBMS_lob.CREATETEMPORARY(coworkers_clob,TRUE);
DBMS_lob.CREATETEMPORARY(readers_clob,TRUE);
DBMS_lob.CREATETEMPORARY(isnew_clob,TRUE);
id_1 :=c1.id;
coworkerstemp_1 :=to_char(','||c1.coworkerstemp||',');
readerstemp_1 :=to_char(','||c1.readerstemp||',');
isnewtemp_1 :=to_char(','||c1.isnewtemp||',');
dbms_lob.write(coworkers_clob,length(coworkerstemp_1),1,coworkerstemp_1);
dbms_lob.write(readers_clob,length(readerstemp_1),1,readerstemp_1);
dbms_lob.write(isnew_clob,length(isnewtemp_1),1,isnewtemp_1);
update cowork_items set coworkers=coworkers_clob,readers=readers_clob,isnew=isnew_clob where id=id_1;
end loop;
end;
/
alter table cowork_items drop column coworkerstemp
/
alter table cowork_items drop column readerstemp
/
alter table cowork_items drop column isnewtemp
/
INSERT INTO HtmlLabelIndex values(19780,'标记为重要协作事件')
/
INSERT INTO HtmlLabelIndex values(19779,'标记为不重要协作事件')
/
INSERT INTO HtmlLabelInfo VALUES(19779,'标记为不重要协作事件',7)
/
INSERT INTO HtmlLabelInfo VALUES(19779,'Sign Not Importent',8)
/
INSERT INTO HtmlLabelInfo VALUES(19780,'标记为重要协作事件',7)
/
INSERT INTO HtmlLabelInfo VALUES(19780,'Sign importent',8)
/
create or replace PROCEDURE cowork_items_insert
(name_1 varchar2,
typeid_2 integer,
levelvalue_3 integer,
creater_4 integer,
coworkers_5 clob,
createdate_6 char,
createtime_7 char,
begindate_8 char,
beingtime_9 char,
enddate_10 char,
endtime_11 char,
relatedprj_12 varchar2,
relatedcus_13 varchar2,
relatedwf_14 varchar2,
relateddoc_15 varchar2,
remark_16 clob,
status_17 integer,
isnew_18 varchar2,
flag out integer ,
msg out varchar2,
thecursor IN OUT cursor_define.weavercursor)
as begin
INSERT INTO cowork_items
( name,
typeid,
levelvalue,
creater,
coworkers,
createdate,
createtime,
begindate,
beingtime,
enddate,
endtime,
relatedprj,
relatedcus,
relatedwf,
relateddoc,
remark,
status,
isnew)
VALUES
( name_1,
typeid_2,
levelvalue_3,
creater_4,
coworkers_5,
createdate_6,
createtime_7,
begindate_8,
beingtime_9,
enddate_10,
endtime_11,
relatedprj_12,
relatedcus_13,
relatedwf_14,
relateddoc_15,
remark_16,
status_17,
isnew_18);
open thecursor for
select max(id) from docseccategory;
end;
/
CREATE or replace PROCEDURE cowork_items_update
(id_1 integer,
name_2 varchar2,
typeid_3 integer,
levelvalue_4 integer,
creater_5 integer,
coworkers_6 clob,
begindate_7 char,
beingtime_8 char,
enddate_9 char,
endtime_10 char,
relatedprj_11 varchar2,
relatedcus_12 varchar2,
relatedwf_13 varchar2,
relateddoc_14 varchar2,
remark_15 clob,
isnew_16 varchar2,
flag out integer ,
msg out varchar2,
thecursor IN OUT cursor_define.weavercursor)
as
begin
UPDATE cowork_items SET
name = name_2,
typeid = typeid_3,
levelvalue = levelvalue_4,
creater = creater_5,
coworkers = coworkers_6,
begindate = begindate_7,
beingtime = beingtime_8,
enddate = enddate_9,
endtime = endtime_10,
relatedprj = relatedprj_11,
relatedcus = relatedcus_12,
relatedwf = relatedwf_13,
relateddoc = relateddoc_14,
remark = remark_15,
isnew = isnew_16
WHERE
( id = id_1);
end;
/
Declare
id2 integer;
readers2 varchar2(8000);
isnew2 varchar2(8000);
begin
FOR all_cursor2 in(
select id,isnew,readers from cowork_items)
loop
id2 := all_cursor2.id;
readers2 := all_cursor2.isnew;
isnew2 := all_cursor2.readers;
readers2 := ','|| to_char(readers2) ||',';
isnew2 := ','|| to_char(isnew2)||',';
update cowork_items set readers = readers2,isnew = isnew2 where id = id2;
END loop;
end;
/
|
--Select all needed info from tow tables
SELECT p.FullName, p.PhoneNumber AS PersonalPhoneNumber, p.FaxNumber AS PersonalFaxNumber,
c.PhoneNumber AS CompanyPhoneNumber, c.FaxNumber AS CompanyFaxNumber
FROM WideWorldImporters.Application.People p
LEFT JOIN WideWorldImporters.Sales.Customers c
ON p.PersonID = c.PrimaryContactPersonID
OR p.PersonID = c.AlternateContactPersonID; |
/*
SQLyog Ultimate v12.09 (64 bit)
MySQL - 5.7.11 : Database - callcenter
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`callcenter` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `callcenter`;
/*Table structure for table `atendente` */
DROP TABLE IF EXISTS `atendente`;
CREATE TABLE `atendente` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nome` varchar(255) DEFAULT NULL,
`telefone` varchar(255) DEFAULT NULL,
`tipo` varchar(255) DEFAULT NULL,
`login` varchar(20) DEFAULT NULL,
`senha` varchar(20) DEFAULT NULL,
`ativo` varchar(20) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8;
/*Data for the table `atendente` */
insert into `atendente`(`id`,`nome`,`telefone`,`tipo`,`login`,`senha`,`ativo`) values (1,'Deodoro da Fonseca','1212121','admin','1','virus1','1');
insert into `atendente`(`id`,`nome`,`telefone`,`tipo`,`login`,`senha`,`ativo`) values (2,'Floriano Peixoto','1245454','atendente','2','virus2','1');
insert into `atendente`(`id`,`nome`,`telefone`,`tipo`,`login`,`senha`,`ativo`) values (3,'Prodente de Moraes','54545','suporte','3','virus3','1');
insert into `atendente`(`id`,`nome`,`telefone`,`tipo`,`login`,`senha`,`ativo`) values (4,'Campos Sales','2544454','suporte','4','virus4','1');
insert into `atendente`(`id`,`nome`,`telefone`,`tipo`,`login`,`senha`,`ativo`) values (5,'Rodrigues Alves','2121','suporte','5','virus5','1');
insert into `atendente`(`id`,`nome`,`telefone`,`tipo`,`login`,`senha`,`ativo`) values (6,'Afonso Pena','2913','suporte','7','virus6','1');
insert into `atendente`(`id`,`nome`,`telefone`,`tipo`,`login`,`senha`,`ativo`) values (7,'Nilo Pecanha','2913','suporte','8','virus7','1');
insert into `atendente`(`id`,`nome`,`telefone`,`tipo`,`login`,`senha`,`ativo`) values (8,'Hermes da Fonseca','1964164','admin','9','virus8','1');
insert into `atendente`(`id`,`nome`,`telefone`,`tipo`,`login`,`senha`,`ativo`) values (9,'Venscelau Bras','9456464','suporte','10','virus9','1');
insert into `atendente`(`id`,`nome`,`telefone`,`tipo`,`login`,`senha`,`ativo`) values (10,'Delfin Moreira','84','suporte','11','virus10','1');
insert into `atendente`(`id`,`nome`,`telefone`,`tipo`,`login`,`senha`,`ativo`) values (11,'Epitacio Pessoa','5488','suporte','12','virus11','1');
insert into `atendente`(`id`,`nome`,`telefone`,`tipo`,`login`,`senha`,`ativo`) values (12,'Arthur Bernardes','34112800','atendente','13','virus12','1');
insert into `atendente`(`id`,`nome`,`telefone`,`tipo`,`login`,`senha`,`ativo`) values (13,'Whashinton Luis','34112800','atendente','14','virus13','1');
insert into `atendente`(`id`,`nome`,`telefone`,`tipo`,`login`,`senha`,`ativo`) values (14,'Julio Prestes','34112800','atendente','15','virus14','1');
insert into `atendente`(`id`,`nome`,`telefone`,`tipo`,`login`,`senha`,`ativo`) values (15,'Agusto Tasso','3425-1683','suporte','16','virus15','1');
insert into `atendente`(`id`,`nome`,`telefone`,`tipo`,`login`,`senha`,`ativo`) values (17,'Isaias de Noronha','34112813','atendente','17','virus16','1');
insert into `atendente`(`id`,`nome`,`telefone`,`tipo`,`login`,`senha`,`ativo`) values (19,'Joao Barreto','34112813','suporte','18','virus17','1');
insert into `atendente`(`id`,`nome`,`telefone`,`tipo`,`login`,`senha`,`ativo`) values (20,'Eurico Gaspar','341313131','suporte','29','virus18','1');
insert into `atendente`(`id`,`nome`,`telefone`,`tipo`,`login`,`senha`,`ativo`) values (21,'Getulio Vargas','(66) 9627-6585','atendente','20','virus19','1');
insert into `atendente`(`id`,`nome`,`telefone`,`tipo`,`login`,`senha`,`ativo`) values (22,'Aldair Gomes','123456','suporte','aldair','aldair','1');
insert into `atendente`(`id`,`nome`,`telefone`,`tipo`,`login`,`senha`,`ativo`) values (23,'Julio Medeiros','123456','suporte','julio','julio','1');
insert into `atendente`(`id`,`nome`,`telefone`,`tipo`,`login`,`senha`,`ativo`) values (24,'Lazaro Nascimento','1242121','suporte','lazaro','lazaro','1');
insert into `atendente`(`id`,`nome`,`telefone`,`tipo`,`login`,`senha`,`ativo`) values (25,'Paulo Sergio Theodoro','112145','suporte','paulo','zzzzzz','1');
insert into `atendente`(`id`,`nome`,`telefone`,`tipo`,`login`,`senha`,`ativo`) values (26,'Valterlan Baiano','1215451','suporte','valterlan','baiano','1');
insert into `atendente`(`id`,`nome`,`telefone`,`tipo`,`login`,`senha`,`ativo`) values (27,'Professor Leomoel','99985835','admin','lemoel','phptads','1');
/*Table structure for table `chamado` */
DROP TABLE IF EXISTS `chamado`;
CREATE TABLE `chamado` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_atendente` int(11) DEFAULT NULL,
`id_cliente` int(11) DEFAULT NULL,
`relato` varchar(255) DEFAULT NULL,
`id_elemento` int(11) DEFAULT NULL,
`status` varchar(20) DEFAULT 'A',
`dt_abertura` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `id_atendente` (`id_atendente`),
KEY `id_cliente` (`id_cliente`),
KEY `id_elemento` (`id_elemento`),
CONSTRAINT `chamado_ibfk_1` FOREIGN KEY (`id_atendente`) REFERENCES `atendente` (`id`),
CONSTRAINT `chamado_ibfk_2` FOREIGN KEY (`id_cliente`) REFERENCES `cliente` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
/*Data for the table `chamado` */
insert into `chamado`(`id`,`id_atendente`,`id_cliente`,`relato`,`id_elemento`,`status`,`dt_abertura`) values (2,1,2,'O sistema esta pedindo a atualizacao do java. Apos atualizar o sistema nao funciona mais.',5,'C','2016-10-08 21:11:26');
insert into `chamado`(`id`,`id_atendente`,`id_cliente`,`relato`,`id_elemento`,`status`,`dt_abertura`) values (3,1,3,'Erro ao tentar imprimir o relatorio de faturamento. Aparece um erro de pagina nao encontrada',7,'A','2016-10-08 21:11:26');
insert into `chamado`(`id`,`id_atendente`,`id_cliente`,`relato`,`id_elemento`,`status`,`dt_abertura`) values (4,1,3,'Sistema muito lento para emitir notas fiscais',6,'A','2016-10-08 21:21:55');
insert into `chamado`(`id`,`id_atendente`,`id_cliente`,`relato`,`id_elemento`,`status`,`dt_abertura`) values (5,1,3,'Nao e possivel fazer o upload das fotos. Aparece que o o servidor esta com a memoria cheia',6,'E','2016-10-08 21:21:55');
insert into `chamado`(`id`,`id_atendente`,`id_cliente`,`relato`,`id_elemento`,`status`,`dt_abertura`) values (6,1,3,'O sistema esta fechando sozinho. Aparece na tela uma mensagem escrito Appcrash',6,'A','2016-10-08 21:21:55');
insert into `chamado`(`id`,`id_atendente`,`id_cliente`,`relato`,`id_elemento`,`status`,`dt_abertura`) values (7,1,1,'O programa XYZ nao abre. Esta pedindo o .NET 4.5',1,'E','2016-10-08 21:32:49');
insert into `chamado`(`id`,`id_atendente`,`id_cliente`,`relato`,`id_elemento`,`status`,`dt_abertura`) values (8,1,3,'O sistema nao consegue imprimir notas fiscais. A opcao de impressao esta desativada',1,'A','2016-10-09 00:16:46');
insert into `chamado`(`id`,`id_atendente`,`id_cliente`,`relato`,`id_elemento`,`status`,`dt_abertura`) values (9,1,3,'Favor corrigir algumas traducoes para o portugues da tela de cadastro de veiculos. Alugns campos aparecem em ingles',5,'C','2016-10-09 06:57:51');
insert into `chamado`(`id`,`id_atendente`,`id_cliente`,`relato`,`id_elemento`,`status`,`dt_abertura`) values (10,1,1,'Programa A esta consumindo muita memoria. O PC trava sempre que abre.',1,'E','2016-10-09 09:54:40');
insert into `chamado`(`id`,`id_atendente`,`id_cliente`,`relato`,`id_elemento`,`status`,`dt_abertura`) values (11,15,4,'Nao consigo logar no sistema. Esta informando que meu acesso foi bloqueado. Usuario: alberto',20,'C','2016-10-10 00:43:15');
insert into `chamado`(`id`,`id_atendente`,`id_cliente`,`relato`,`id_elemento`,`status`,`dt_abertura`) values (12,17,3,'O sistema de chamada automatatica nao reproduz os sons',10,'A','2016-10-10 00:54:15');
/*Table structure for table `cliente` */
DROP TABLE IF EXISTS `cliente`;
CREATE TABLE `cliente` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nome` varchar(255) DEFAULT NULL,
`telefone` varchar(255) DEFAULT NULL,
`telefone2` varchar(255) DEFAULT NULL,
`pessoa` varchar(255) DEFAULT NULL,
`email` varchar(255) DEFAULT NULL,
`contato` varchar(255) DEFAULT NULL,
`endereco` varchar(255) DEFAULT NULL,
`cidade` varchar(255) DEFAULT NULL,
`estado` varchar(10) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
/*Data for the table `cliente` */
insert into `cliente`(`id`,`nome`,`telefone`,`telefone2`,`pessoa`,`email`,`contato`,`endereco`,`cidade`,`estado`) values (1,'Carlos Luz','454545','741741','fisica','teste@teste','Carlos','Av. Senador Atilio Fontana, 1001 - Distro Industrial','Rondonopolis','MT');
insert into `cliente`(`id`,`nome`,`telefone`,`telefone2`,`pessoa`,`email`,`contato`,`endereco`,`cidade`,`estado`) values (2,'Nereu Ramos','232323','5645644','fisica','teste@teste','Nereu','Rua Fernando Correia da Costa, 1000 - Centro','Rondonopolis','MT');
insert into `cliente`(`id`,`nome`,`telefone`,`telefone2`,`pessoa`,`email`,`contato`,`endereco`,`cidade`,`estado`) values (3,'Celia Marta Oliveira','5050505','464646556','fisica','teste@teste','Celia','Rua Barao do Melgaco, 364 - Centro','Cuiaba','MT');
insert into `cliente`(`id`,`nome`,`telefone`,`telefone2`,`pessoa`,`email`,`contato`,`endereco`,`cidade`,`estado`) values (4,'Bungue Alimentos','7777777','464645','juridica','teste@teste','Alisson','Rua Afonso Pena, 144 - Centro','Rondonopolis','MT');
insert into `cliente`(`id`,`nome`,`telefone`,`telefone2`,`pessoa`,`email`,`contato`,`endereco`,`cidade`,`estado`) values (5,'ADM do Brasil LTDA','34112800','644646','juridica','teste@teste','Herika','Rua Rio Braco, 785 - Vila Aurora','Rondonopolis','MT');
insert into `cliente`(`id`,`nome`,`telefone`,`telefone2`,`pessoa`,`email`,`contato`,`endereco`,`cidade`,`estado`) values (6,'Soraya Neubern','15454','99999564','fisica','teste@teste','Soraya','Rua Margarida, 544 - Vila Mineira','Rondonopolis','MT');
insert into `cliente`(`id`,`nome`,`telefone`,`telefone2`,`pessoa`,`email`,`contato`,`endereco`,`cidade`,`estado`) values (7,'Erica Inacio de Araujo','1545454','999964','fisica','teste@teste','Erica','Rua das Araras, 2914 - Pq. Universitario','Cuiaba','MT');
insert into `cliente`(`id`,`nome`,`telefone`,`telefone2`,`pessoa`,`email`,`contato`,`endereco`,`cidade`,`estado`) values (8,'Julia Lopes','1545154','9154646','fisica','teste@teste','Julia','Av. Bandeiantes, 1004 - Centro','Goiania','GO');
insert into `cliente`(`id`,`nome`,`telefone`,`telefone2`,`pessoa`,`email`,`contato`,`endereco`,`cidade`,`estado`) values (9,'Bruna Marquesine','15451','94594545','fisica','teste@teste','Bruna','Av. Beija Flor, 145 - Vila Olinda','Rio de Janeiro','RJ');
insert into `cliente`(`id`,`nome`,`telefone`,`telefone2`,`pessoa`,`email`,`contato`,`endereco`,`cidade`,`estado`) values (10,'Casa Rosa','1515',NULL,'juridica','teste@teste','Oga','Rua A, QD12, LT13','Guiratinga','MT');
/*Table structure for table `tramite` */
DROP TABLE IF EXISTS `tramite`;
CREATE TABLE `tramite` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`hora_ini` time DEFAULT NULL,
`hora_fin` time DEFAULT NULL,
`tramite` varchar(255) DEFAULT NULL,
`solucao` tinyint(1) DEFAULT NULL,
`id_chamado` int(11) DEFAULT NULL,
`data` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `id_chamado` (`id_chamado`),
CONSTRAINT `tramite_ibfk_1` FOREIGN KEY (`id_chamado`) REFERENCES `chamado` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;
/*Data for the table `tramite` */
insert into `tramite`(`id`,`hora_ini`,`hora_fin`,`tramite`,`solucao`,`id_chamado`,`data`) values (1,'02:12:00','04:15:00','Foi feita uma tentativa de ligacao para o usuario porem o mesmo nao atendeu. Sera retornada a ligacao',0,2,'2016-10-18 02:42:15');
insert into `tramite`(`id`,`hora_ini`,`hora_fin`,`tramite`,`solucao`,`id_chamado`,`data`) values (2,'04:15:00','08:12:00','Foi feita uma tentativa de ligacao para o usuario porem o mesmo nao atendeu. Sera retornada a ligacao',0,2,'2016-10-19 02:42:18');
insert into `tramite`(`id`,`hora_ini`,`hora_fin`,`tramite`,`solucao`,`id_chamado`,`data`) values (3,'04:18:00','09:47:00','tentativa de ligacao - usuario nao responde',0,3,'2016-10-20 02:42:20');
insert into `tramite`(`id`,`hora_ini`,`hora_fin`,`tramite`,`solucao`,`id_chamado`,`data`) values (4,'08:15:00','08:16:00','O relatorio e gerado em PDF e a maquina do cliente estava sem o Acrobat Reader. Apos a isntalacao do aplicativo o problema foi resolvido.',1,3,'2016-10-13 02:42:23');
insert into `tramite`(`id`,`hora_ini`,`hora_fin`,`tramite`,`solucao`,`id_chamado`,`data`) values (5,'01:00:00','02:00:00','Foi feita uma tentativa de ligacao para o usuario porem o mesmo nao atendeu. Sera retornada a ligacao',0,2,'2016-10-09 03:59:59');
insert into `tramite`(`id`,`hora_ini`,`hora_fin`,`tramite`,`solucao`,`id_chamado`,`data`) values (6,'01:15:00','14:22:00','Foi feita uma tentativa de ligacao para o usuario porem o mesmo nao atendeu. Sera retornada a ligacao',0,2,'2016-10-09 04:01:41');
insert into `tramite`(`id`,`hora_ini`,`hora_fin`,`tramite`,`solucao`,`id_chamado`,`data`) values (7,'01:15:00','14:22:00','Foi feita uma tentativa de ligacao para o usuario porem o mesmo nao atendeu. Sera retornada a ligacao',0,2,'2016-10-09 04:01:48');
insert into `tramite`(`id`,`hora_ini`,`hora_fin`,`tramite`,`solucao`,`id_chamado`,`data`) values (8,'01:15:00','14:22:00','Foi feita uma tentativa de ligacao para o usuario porem o mesmo nao atendeu. Sera retornada a ligacao',0,2,'2016-10-09 04:03:09');
insert into `tramite`(`id`,`hora_ini`,`hora_fin`,`tramite`,`solucao`,`id_chamado`,`data`) values (9,'00:00:00','00:00:00','tentativa de ligacao - usuario nao responde',0,3,'2016-10-09 04:04:43');
insert into `tramite`(`id`,`hora_ini`,`hora_fin`,`tramite`,`solucao`,`id_chamado`,`data`) values (10,'00:00:00','00:00:00','tentativa de ligacao - usuario nao responde',0,3,'2016-10-09 04:04:50');
insert into `tramite`(`id`,`hora_ini`,`hora_fin`,`tramite`,`solucao`,`id_chamado`,`data`) values (11,'00:00:00','00:00:00','tentativa de ligacao - usuario nao responde',0,3,'2016-10-09 04:06:32');
insert into `tramite`(`id`,`hora_ini`,`hora_fin`,`tramite`,`solucao`,`id_chamado`,`data`) values (12,'02:00:00','01:00:00','tentativa de ligacao - usuario nao responde',0,3,'2016-10-09 04:06:40');
insert into `tramite`(`id`,`hora_ini`,`hora_fin`,`tramite`,`solucao`,`id_chamado`,`data`) values (13,'02:00:00','01:00:00','tentativa de ligacao - usuario nao responde',0,3,'2016-10-09 04:06:47');
insert into `tramite`(`id`,`hora_ini`,`hora_fin`,`tramite`,`solucao`,`id_chamado`,`data`) values (14,'02:00:00','17:00:00','Traducoes foram realizadas e inseridas na build. Entar em producao em 11/11/2011',1,9,'2016-10-09 04:13:04');
insert into `tramite`(`id`,`hora_ini`,`hora_fin`,`tramite`,`solucao`,`id_chamado`,`data`) values (15,'00:00:00','00:00:00','Foi feita uma tentativa de ligacao para o usuario porem o mesmo nao atendeu. Sera retornada a ligacao',1,2,'2016-10-09 05:14:49');
insert into `tramite`(`id`,`hora_ini`,`hora_fin`,`tramite`,`solucao`,`id_chamado`,`data`) values (16,'20:20:00','16:30:00','Foi constatado que trata-se de uma instabilidade do SEFAZ. Ja esta normalziado',1,4,'2016-10-09 13:08:30');
insert into `tramite`(`id`,`hora_ini`,`hora_fin`,`tramite`,`solucao`,`id_chamado`,`data`) values (17,'20:20:00','10:10:00','tentativa de ligacao - usuario nao responde',0,3,'2016-10-09 13:19:21');
insert into `tramite`(`id`,`hora_ini`,`hora_fin`,`tramite`,`solucao`,`id_chamado`,`data`) values (18,'04:05:00','17:00:00','Solicitado para o usuario enviar a sugestao de traducao',0,9,'2016-10-09 15:10:34');
insert into `tramite`(`id`,`hora_ini`,`hora_fin`,`tramite`,`solucao`,`id_chamado`,`data`) values (19,'20:20:00','20:02:00','A senha foi bloqueada por tentativas erradas de logon. O usuario foi desbloqueado',1,11,'2016-10-09 19:44:45');
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
-- * DDL HEADER: dev.asft_clc2_ckdescms_wrk ***
-- *************************** TABLE HEADER ******************************
-- *
-- * NAME : asft_clc2_ckdescms_wrk.sql
-- *
-- * PURPOSE: Creates dev.asft_clc2_ckdescms_wrk table
-- *
-- * HISTORY: AUTHOR DATE DESCRIPTION
-- * ETLAdmin 2017-04-19 Table created
-- *
-- ***********************************************************************
USE dev;
CREATE TABLE dev.asft_clc2_ckdescms_wrk
(
dscode VARCHAR(1) ,
dskeym VARCHAR(10) ,
dsdesc VARCHAR(30) ,
dsrate DECIMAL(9,4) ,
dsxref VARCHAR(10) ,
dsglac VARCHAR(30) ,
dsacti VARCHAR(1) ,
dssftl DECIMAL(5,2) ,
dsexfl DECIMAL(2,0) ,
dseout DECIMAL(2,0) ,
dstcr1 VARCHAR(10) ,
dstcr2 VARCHAR(10) ,
dstcrp VARCHAR(5) ,
dstcs1 VARCHAR(10) ,
dstcs2 VARCHAR(10) ,
dstok1 VARCHAR(10) ,
dstok2 VARCHAR(10) ,
dstokp VARCHAR(5) ,
dsex01 VARCHAR(1) ,
dsex02 VARCHAR(1) ,
dsex03 VARCHAR(5) ,
dsex04 VARCHAR(5) ,
dsex05 VARCHAR(10) ,
dsex06 VARCHAR(10) ,
dsex07 DECIMAL(9,4) ,
dsex08 DECIMAL(9,4) ,
dsex09 DECIMAL(10,0) ,
dsex10 DECIMAL(10,0) ,
dsex11 DECIMAL(5,2) ,
dsex12 DECIMAL(5,2) ,
dsex13 DECIMAL(5,0) ,
dsex14 DECIMAL(5,0) ,
dsex15 DECIMAL(8,0) ,
dsex16 DECIMAL(8,0) ,
dsex17 VARCHAR(10) ,
dsex18 VARCHAR(10) ,
dsex19 VARCHAR(10) ,
dsex20 VARCHAR(10) ,
dsex21 VARCHAR(10) ,
dsex22 VARCHAR(10) ,
dsex23 VARCHAR(10) ,
dsex24 VARCHAR(10) ,
dsex25 VARCHAR(10) ,
dsex26 VARCHAR(10) ,
RRN_FIELD VARCHAR(10) ,
SV_MANIP_TYPE CHAR(1) ,
SV_TRANS_ID BIGINT ,
SV_TRANS_ROW_SEQ INT ,
SV_SENDING_TABLE VARCHAR(25) ,
SV_SENDING_DBMS VARCHAR(25) ,
SV_SENDING_SERVER VARCHAR(25) ,
SV_TRANS_TIMESTAMP VARCHAR(20) ,
SV_TRANS_USERNAME VARCHAR(25) ,
SV_PROGRAM_NAME VARCHAR(25) ,
SV_JOB_NAME VARCHAR(25) ,
SV_JOB_USER VARCHAR(25) ,
SV_JOB_NUMBER VARCHAR(25) ,
SV_OP_TIMESTAMP VARCHAR(20) ,
SV_FILE_MEMBER VARCHAR(25) ,
SV_RECEIVER_LIBRARY VARCHAR(25) ,
SV_RECEIVER_NAME VARCHAR(25) ,
SV_JOURNAL_SEQNO BIGINT
)ROW FORMAT SERDE
'org.apache.hadoop.hive.contrib.serde2.MultiDelimitSerDe'
WITH SERDEPROPERTIES (
'field.delim'='\",\"')
STORED AS INPUTFORMAT
'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
LOCATION
'hdfs://swiftdev1/user/hive/warehouse/dev.db/asft_clc2_ckdescms_wrk';
|
create view rpt_engagement_by_platform as
select
e1.played_ts,
e1.game_variation_template_name,
e1.platform,
-100 * e2.total_amount / e1.total_amount payout,
e1.num_players,
e1.num_transactions num_stakes,
e1.total_amount total_stakes,
e2.num_transactions num_returns,
e2.total_amount total_returns
from engagement_by_platform e1, engagement_by_platform e2
where e1.played_ts = e2.played_ts
and e1.game_variation_template_name = e2.game_variation_template_name
and e1.platform = e2.platform
and e1.transaction_type = 'Stake'
and e2.transaction_type = 'Return'
order by 1, 2, 3;
GRANT SELECT ON rpt_engagement_by_platform TO GROUP READ_ONLY;
GRANT ALL ON rpt_engagement_by_platform TO GROUP READ_WRITE;
GRANT ALL ON rpt_engagement_by_platform TO GROUP SCHEMA_MANAGER;
|
# Q1 It's time for the seniors to graduate. Remove all 12th graders from Highschooler.
delete from highschooler
where grade = 12
# Q2 If two students A and B are friends, and A likes B but not vice-versa, remove the Likes tuple.
delete from Likes
where ID2 in (select ID2 from Friend where Likes.ID1 = ID1) and
ID2 not in (select L.ID1 from Likes L where Likes.ID1 = L.ID2);
# or
create temporary table if not exists T2 as(
select l.ID1
from friend f, likes l
where l.ID1 = f.ID1 and l.ID2 = f.ID2
and l.ID2 not in (select l2.ID1 from likes l2 where l2.ID2 = l.ID1)
)
create temporary table if not exists T3 as(
select l.ID2
from friend f, likes l
where l.ID1 = f.ID1 and l.ID2 = f.ID2
and l.ID2 not in (select l2.ID1 from likes l2 where l2.ID2 = l.ID1)
)
delete from likes
where likes.ID1 in (select ID1 from T2) and likes.ID2 in (select ID2 from T3)
# Q3 For all cases where A is friends with B, and B is friends with C, add a new friendship for the pair A and C.
# Do not add duplicate friendships, friendships that already exist, or friendships with oneself.
# (This one is a bit challenging; congratulations if you get it right.)
|
UPDATE objectives
SET task_status = $1
WHERE id = $2; |
-- list avg salary
SELECT AVG(salary)
FROM employee;
-- list employees who earn more than the average salary
SELECT lname, salary
FROM Employee
WHERE salary > ( SELECT AVG(salary) FROM employee );
-- list lname, salary for employees with salaries greater
-- than the average for their department
SELECT lname, salary
FROM Employee e
WHERE salary >
( SELECT Avg(salary)
FROM employee, department
WHERE e.dno=dno );
-- list each dept name and average salary (nested select)
SELECT dname,
( SELECT AVG(salary) FROM employee WHERE dno=dnumber )
as average_salary
FROM department;
-- alt form of above using grouping
SELECT dname, AVG(salary)
FROM department, employee
WHERE dno=dnumber
GROUP BY dname;
-- list name, dept name and numbber and salary for employees with
-- salary > 32,000
SELECT lname, dname, dno, salary
FROM employee, department
WHERE salary > 32000
AND dno=dnumber;
-- list dept name, no and avg salary
SELECT dname, dnumber, AVG(salary)
FROM employee, department
WHERE dnumber=dno
GROUP BY dname, dnumber;
-- list dept name for depts with avg salary > 32000
SELECT dname, AVG(salary) as average_salary
FROM department, employee
WHERE dno=dnumber
AND (SELECT AVG(salary) FROM employee WHERE dno=dnumber) > 32000
GROUP BY dname;
-- alt form of above
SELECT dname, avgsal as average_salary
FROM (SELECT dno, AVG(salary) as avgsal from employee GROUP BY dno), department
WHERE dno=dnumber
AND avgsal > 32000;
-- alt form of above with having
SELECT dname, AVG(salary) as average_salary
FROM department, employee
WHERE dno=dnumber
GROUP BY dname
HAVING AVG(salary) > 32000;
|
create table tbl_reply (
rno int auto_increment primary key not null, -- 댓글 번호
bno int not null, -- 게시물 번호
rgrpno int not null, -- 댓글 그룹번호
rprtno int default 0, -- 댓글 부모 번호
rgrpord int default 0, -- 그룹내의 순서
rdepth int default 1, -- 댓글의 depth
replytext text, -- 댓글 내용
replyer varchar(50) not null, -- 작성자
regdate timestamp default now(), -- 작성일자
updatedate timestamp default now(), -- 수정일자
FOREIGN KEY (bno) REFERENCES tbl_board (bno)
); |
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `insertHealthData`(IN sID char(30),
IN measureDate DATE, IN weight DOUBLE
, IN bodyfat Double, IN muscleMass Double, IN bmi Double
)
Begin
insert into healthtbl
values(sID,measureDate,weight,bodyfat,muscleMass,bmi);
end$$
DELIMITER ;
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `selectHealthData`()
Begin
select s.studentID, s.sName, h.measureDate, h.weight, h.bodyfat, h.muscleMass, h.bmi
from healthtbl h
inner join studenttbl s
on h.studentID = s.studentID order by h.measureDate;
end$$
DELIMITER ;
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `selectHealthDataByID`(IN sID char(30))
Begin
DECLARE result int default 0;
set result=(select count(*) from healthtbl where studentID = sID);
select s.studentID, s.sName, h.measureDate, h.weight, h.bodyfat, h.muscleMass, h.bmi ,result
from healthtbl h
inner join studenttbl s
on h.studentID = s.studentID where h.studentID=sID order by h.measureDate;
end$$
DELIMITER ;
|
-- Person
CLASS Person "Persons related to the company"
(
person-id : INTEGER, REQUIRED;
first-name : STRING, REQUIRED;
last-name : STRING, REQUIRED;
home_address : STRING;
zipcode : INTEGER;
home-phone "Home phone number (optional)" : INTEGER;
us-citizen "U.S. citizenship status" : BOOLEAN, REQUIRED;
spouse "Person's spouse if married" : Person, INVERSE IS spouse;
children "Person's children (optional)" : Person, MV(DISTINCT), INVERSE IS parents;
parents "Person's parents (optional)" : Person, MV(DISTINCT, MAX 2), INVERSE IS children;
);
-- Employee
SUBCLASS Employee "Current employees of the company" OF Person
(
employee-id "Unique employee identification" : INTEGER, REQUIRED;
salary "Current yearly salary" : INTEGER, REQUIRED;
salary-exception "TRUE if salary can exceed maximum" : BOOLEAN;
employee-manager "Employee's current manager" : Manager, INVERSE IS employees-managing;
);
-- Project-Employee
SUBCLASS Project-Employee "Employees who are project team members" OF Employee
(
current-projects "current project of employee" : Current-Project, MV (DISTINCT, MAX 6), INVERSE IS project-members;
);
-- Manager
SUBCLASS Manager "Managers of the company" OF Employee
(
bonus "Yearly bonus, if any" : INTEGER;
employees-managing "Employees reporting to manager" : Employee, MV, INVERSE IS employee-manager;
projects-managing "Projects responsible for" : Project, MV, INVERSE IS project-manager;
manager-dept "Department to which manager belong" : Department, INVERSE IS dept-managers;
);
-- Interim-Manager
SUBCLASS Interim-Manager "Employees temporarily acting as a project employee and a manager" OF Manager AND Project-Employee();
-- President
SUBCLASS President "Current president of the company" OF Manager();
-- Previous-Employee
SUBCLASS Previous-Employee "Past employees of the company" OF Person
(
IsFired : BOOLEAN;
salary "Salary as of termination" : INTEGER, REQUIRED;
);
-- Project
CLASS Project "Current and completed Projects"
(
project-no "Unique project identification" : INTEGER, REQUIRED;
project-title "Code name for project" : STRING [20], REQUIRED;
project-manager "Current project manager" : Manager, INVERSE IS projects-managing;
dept-assigned "Responsible department" : Department, SV, INVERSE IS project-at;
sub-projects "Component projects, if any" : Project, MV, INVERSE IS sub-project-of;
sub-project-of "Master project, if any" : Project, INVERSE IS sub-projects;
);
-- Current-Project
SUBCLASS Current-Project "Projects currently in progress" OF Project
(
project-active "Whether project has been started" : BOOLEAN, REQUIRED;
project-members "Current employees on project" : Project-Employee, MV (DISTINCT, MAX 20), INVERSE IS current-projects;
);
-- Previous-Project
SUBCLASS Previous-Project "Completed Projects" OF Project
(
end-date-month "Date project completed month" : INTEGER;
end-date-day "Date project completed day" : INTEGER;
end-date-year "Date project completed year" : INTEGER;
est-person-hours "Estimated hours to complete" : INTEGER;
);
-- Department
CLASS Department "Departments within the company"
(
dept-no "Corporate department number" : INTEGER, REQUIRED;
dept-name "Corporate department name" : STRING [20], REQUIRED;
project-at "Projects worked on at this department" : Project, MV(DISTINCT), INVERSE IS dept-assigned;
dept-managers "Managers for this department" : Manager, MV, INVERSE IS manager-dept;
);
|
-- database
CREATE DATABASE IF NOT EXISTS hellomybatis;
USE hellomybatis;
-- table users
ALTER TABLE users
ADD COLUMN
create_time TIMESTAMP NOT NULL DEFAULT current_timestamp,
ADD COLUMN
update_time TIMESTAMP NOT NULL DEFAULT current_timestamp ON UPDATE current_timestamp;
|
SELECT COUNT(*) FROM ROLE_FUNCTIONS
WHERE DELETE_FLAG = 0;
|
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0000729', 'Abdominal Cramps');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0000737', 'Abdominal Pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0003126', 'Anosmia');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0003862', 'Arthralgia');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0004134', 'Ataxia');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0004604', 'Back Pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0005858', 'Bloodshot eye');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0005874', 'Blushing');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0005904', 'Body Temperature Changes');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0006625', 'Cachexia');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0007758', 'Cerebellar Ataxia');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0007859', 'Neck Pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0007939', 'Syphilitic chancre');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0008031', 'Chest Pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0008035', 'Chest wall pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0009193', 'Pain in the coccyx');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0009269', 'Cold intolerance');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0009806', 'Constipation');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0010200', 'Coughing');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0010201', 'Chronic cough');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0011124', 'Decreased Libido');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0011991', 'Diarrhea');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0012833', 'Dizziness');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0013132', 'Drooling');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0013395', 'Dyspepsia');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0013404', 'Dyspnea');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0013421', 'Dystonia');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0013428', 'Dysuria');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0013456', 'Earache');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0014724', 'Eructation');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0015230', 'Exanthema');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0015468', 'Facial Pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0015644', 'Muscular fasciculation');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0015672', 'Fatigue');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0016199', 'Flank Pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0016204', 'Flatulence');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0016382', 'Flushing');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0016512', 'Foot pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0017672', 'Glossalgia');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0018520', 'Halitosis');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0018681', 'Headache');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0018834', 'Heartburn');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0019079', 'Hemoptysis');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0019209', 'Hepatomegaly');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0019559', 'Hip pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0019825', 'Hoarseness');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0020175', 'Hunger');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0023218', 'Leg cramps');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0023222', 'Pain in lower limb');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0023380', 'Lethargy');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0024031', 'Low Back Pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0024902', 'Mastodynia');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0025587', 'Metatarsalgia');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0026821', 'Muscle Cramp');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0026837', 'Muscle Rigidity');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0026838', 'Muscle Spasticity');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0026961', 'Mydriasis');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0027066', 'Myoclonus');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0027424', 'Nasal congestion (finding)');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0027497', 'Nausea');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0027498', 'Nausea and vomiting');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0027769', 'Nervousness');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0027796', 'Neuralgia');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0028081', 'Night sweats');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0028084', 'Nightmares');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0028643', 'Numbness');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0030193', 'Pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0030201', 'Pain| Postoperative');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0030552', 'Paresis');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0030794', 'Pelvic Pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0032617', 'Polyuria');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0032781', 'Posterior rhinorrhea');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0033774', 'Pruritus');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0033775', 'Pruritus Ani');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0033777', 'Pruritus of genital organs');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0034642', 'Rales');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0034886', 'Rectal pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0036396', 'Sciatica');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0036572', 'Seizures');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0037011', 'Shoulder Pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0037088', 'Signs and Symptoms');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0037317', 'Sleep disturbances');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0037384', 'Snoring');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0037763', 'Spasm');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0039070', 'Syncope');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0039591', 'Pain in testicle');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0040460', 'Toothache');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0040822', 'Tremor');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0042256', 'Pruritus of vagina');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0042571', 'Vertigo');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0042963', 'Vomiting');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0043144', 'Wheezing');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0085593', 'Chills');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0085594', 'Fever with chills');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0085624', 'Burning sensation');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0085631', 'Agitation');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0085632', 'Apathy');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0085635', 'Photopsia');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0085636', 'Photophobia');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0086132', 'Depressive Symptoms');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0086189', 'Drug Withdrawal Symptoms');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0087169', 'Withdrawal Symptoms');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0149651', 'Clubbing');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0149738', 'neurological pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0149751', 'Penile lesion');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0150055', 'Chronic pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0151315', 'Neck stiffness');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0151786', 'Muscle Weakness');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0151825', 'Bone pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0151827', 'Eye pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0151828', 'Injection site pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0151830', 'Pain in urethra');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0151908', 'Dry skin');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0152029', 'Congestion of nasal sinus');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0152031', 'Joint swelling');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0152149', 'Mittelschmerz');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0152447', 'Urethral discharge');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0155002', 'Sudden visual loss');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0156405', 'Ovulation bleeding');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0158369', 'Swelling of limb');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0159028', 'General symptom');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0162298', 'Joint stiffness');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0178310', 'signs and symptoms of ill-defined conditions');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0178419', 'muscle cramps in the calf');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0178422', 'Cramp in foot');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0184567', 'Acute onset pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0220870', 'Lightheadedness');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0221100', 'Hangover from any Alcohol or Other Drugs substance');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0221150', 'Swallowing painful');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0221161', 'Shallow breathing');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0221170', 'Muscular stiffness');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0221232', 'Welts');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0221423', 'Illness (finding)');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0221512', 'Stomach ache');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0221758', 'Stiff back');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0221776', 'Oral pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0221785', 'Pain in wrist');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0231217', 'Multiple symptoms');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0231218', 'Malaise');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0231239', 'Fluctuation');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0231528', 'Myalgia');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0231529', 'Tenalgia');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0231617', 'Catch - Finding of sensory dimension of pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0231655', 'Scapulalgia');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0231749', 'Knee pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0231753', 'Knee locking');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0231772', 'Burning feet');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0231780', 'Heel pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0231807', 'Dyspnea on exertion');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0231811', 'Suffocated');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0231918', 'Nose symptoms');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0232119', 'Pulsus trigeminus');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0232285', 'Dull chest pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0232292', 'Chest tightness');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0232431', 'Cold sweat');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0232462', 'Decrease in appetite');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0232471', 'Thirsty');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0232487', 'Abdominal discomfort');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0232492', 'Upper abdominal pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0232495', 'Lower abdominal pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0232517', 'Gurgling');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0232602', 'Retching');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0232849', 'Bladder pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0232861', 'Discharge from penis');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0233401', 'Psychiatric symptom');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0233488', 'Feeling despair');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0233762', 'Hallucinations| Auditory');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0233763', 'Hallucinations| Visual');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0233766', 'Hallucinations| Gustatory');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0233844', 'Clumsiness');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0233973', 'Painful penile erection');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0234229', 'Deep pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0234230', 'Pain| Burning');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0234233', 'Sore to touch');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0234238', 'Ache');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0234244', 'Tissue Pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0234250', 'Pain| Referred');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0234251', 'Inflammatory pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0234254', 'Radiating pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0234255', 'Night pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0234259', 'Sensitive to smells');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0234369', 'Trembling');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0234532', 'convulsed');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0235004', 'head pressure');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0235031', 'Neurologic Symptoms');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0235050', 'Tingling of skin');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0235108', 'Feeling tense');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0235129', 'Feeling strange');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0235150', 'Feeling Cold');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0235162', 'Difficulty sleeping');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0235234', 'Pharyngeal dryness');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0235239', 'Palpitations - fluttering');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0235240', 'Pounding heart');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0235267', 'Redness of eye');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0235282', 'Roaring in ear');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0235283', 'Buzzing in ear');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0235290', 'bitter taste');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0235299', 'Right upper quadrant pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0235309', 'Upset stomach');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0235524', 'vein pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0235678', 'Vaginal odor');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0235710', 'Chest discomfort');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0236000', 'Jaw pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0236040', 'Pain in calf');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0236075', 'Menopausal symptom');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0236078', 'Pain in scrotum');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0236080', 'Vaginal discomfort');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0236082', 'Vaginal pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0236083', 'Burning feeling vagina');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0238637', 'Anal pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0238656', 'Ankle pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0238740', 'severe back pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0238741', 'Upper back pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0238973', 'Pain in cheek');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0238995', 'sharp chest pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0239134', 'Productive cough');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0239266', 'Pain in elbow');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0239272', 'Elbow stiff');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0239313', 'exercise induced');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0239375', 'Numbness of limbs');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0239377', 'Arm Pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0239431', 'severe eye pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0239435', 'EYE TENDERNESS');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0239511', 'Numbness of face');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0239589', 'Pain in finger');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0239596', 'stiff fingers');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0239649', 'Numbness of foot');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0239667', 'Pain in forearm');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0239725', 'genital pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0239739', 'Tenderness of gums');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0239772', 'GREAT TOE PAIN');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0239783', 'Inguinal pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0239833', 'Hand pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0239836', 'Paresthesia of hand');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0239886', 'Frontal headache');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0240007', 'Inguinal mass');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0240094', 'Joint tenderness');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0240129', 'Knee stiff');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0240141', 'LABIAL PAIN');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0240194', 'Blue lips');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0240211', 'Lip swelling');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0240273', 'Tender lymph node');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0240327', 'Taste| Metallic');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0240382', 'mouth swelling');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0240557', 'Irritation of nose');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0240717', 'Perineal pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0240805', 'Prodrome');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0240812', 'Prostatic pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0240940', 'Scalp pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0240941', 'Pruritus of scalp');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0240958', 'sciatic nerve pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0241032', 'shin pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0241039', 'pain in (l) shoulder');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0241040', 'painful rt shoulder');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0241042', 'Shoulder stiff');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0241044', 'SHOULDER TENDERNESS');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0241050', 'sitting pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0241057', 'Burning sensation of skin');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0241136', 'Pain of skin');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0241164', 'Skin tenderness');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0241165', 'Thick skin');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0241229', 'Spleen tender');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0241374', 'Thigh pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0241381', 'throat burning sensation of');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0241426', 'Burning tongue');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0241494', 'TRUNK PAIN');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0241705', 'Difficulty passing urine');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0241727', 'walking pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0241745', 'Wound pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0241898', 'Generalized fatigue');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0241902', 'Grunting respiration');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0242030', 'pain with eating');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0242429', 'Sore Throat');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0262397', 'Breast tenderness');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0262578', 'Cramp in lower leg associated with rest');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0263534', 'Beau''s lines');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0266836', 'Infantile Colic');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0268988', 'Pruritus of penis');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0270541', 'Rebound Insomnia');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0270697', 'Post-Lumbar Puncture Headache');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0270996', 'Eye swelling');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0271188', 'Visual halos (disorder)');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0278007', 'Normal bowel habits');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0278008', 'Altered bowel function');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0278107', 'Painful ejaculation');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0278139', 'Moderate pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0278141', 'Excruciating pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0278144', 'Dull pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0278145', 'Stabbing pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0278146', 'Shooting pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0278148', 'Throbbing pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0281856', 'Generalized aches and pains');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0282005', 'Swelling of scrotum');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0302539', 'spells (neurological symptom)');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0312414', 'Menstrual spotting');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0312416', 'Morning Sickness');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0312422', 'Blackout - symptom');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0314719', 'Dryness of eye');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0332601', 'Cushingoid facies');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0333243', 'Pitting edema');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0333252', 'Hard edema');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0341742', 'Acute retention of urine');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0344232', 'Blurred vision');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0344375', 'Stomach cramps (finding)');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0392156', 'Akathisia');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0392171', 'Influenza-like symptoms');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0392674', 'Exhaustion');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0392678', 'Swallowing problem');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0392701', 'giddy mood');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0401149', 'Chronic constipation');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0422833', 'ENT symptoms');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0423006', 'Discharge from eye');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0423571', 'Abnormal sensation');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0423572', 'Pins and needles');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0423575', 'Altered sensation of skin');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0423618', 'Throbbing Headache');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0423628', 'Painful teething');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0423636', 'Cardiac pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0423653', 'Type of abdominal pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0423669', 'Elbow joint pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0423673', 'Pain in spine');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0423684', 'Thoracic back pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0423693', 'Growing pains');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0423729', 'Chest pain on breathing');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0423736', 'Scalding pain on urination');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0424489', 'Chapping of lips');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0425449', 'Gasping for breath');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0425481', 'Sighing respiration');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0425485', 'Whooping respiration');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0426359', 'Urinary symptoms');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0426390', 'Bladder spasm');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0426396', 'Urine looks dark');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0426484', 'Throat symptom');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0426623', 'Excessive upper gastrointestinal gas');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0426636', 'Urgent desire for stool');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0427008', 'Stiffness');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0427086', 'Involuntary Movements');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0427149', 'Gait| Drop Foot');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0438716', 'Chest pressure');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0439053', 'Fatigue - symptom');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0439814', 'Prickling sensation');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0451632', 'Sore nostril');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0451633', 'Sore lip');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0455270', 'Sharp pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0455770', 'Feeling of loss of feeling');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0458109', 'Ovarian pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0458118', 'Total body pain syndrome');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0474496', 'Diarrhea and vomiting| symptom');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0475858', 'Generalized pruritus');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0476227', 'pricking of skin');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0476270', 'Cardiovascular symptoms');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0476288', 'Digestive symptom');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0476289', 'Abdominal wind pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0495682', 'cramp and spasm');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0497406', 'Overweight');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0497481', 'Pain in penis');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0518179', 'Change in voice (finding)');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0518214', 'Perceived quality of life');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0520966', 'Abnormal coordination');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0521592', 'Oral hypoesthesia');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0521632', 'Irritation of penis');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0521668', 'Primary Thunderclap Headache');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0522058', 'Carbohydrate craving');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0522067', 'Liver pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0522179', 'Death anxiety');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0522251', 'Sinus pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0522359', 'Vertigo| Constant');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0522365', 'Severe vertigo');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0541798', 'Early Awakening');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0541828', 'Left sided chest pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0541887', 'discomfort rectal');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0541976', 'gas in stomach');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0542476', 'Forgetful');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0546947', 'Choking sensation');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0547030', 'Visual disturbance');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0549248', 'electric shock sensation');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0549263', 'opiate withdrawal symptoms');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0549297', 'ear swelling');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0549299', 'uti symptoms');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0549391', 'bladder discomfort');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0553668', 'Labored breathing');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0553713', 'BREAST PAIN FEMALE');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0557875', 'Tired');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0558148', 'Yellow complexion');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0558489', 'Renal pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0558920', 'Lump on thigh');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0558921', 'Rectal symptoms');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0559687', 'Congestion of throat');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0560024', 'Swelling of eyelid');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0562483', 'Persistent cough');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0563275', 'Right sided chest pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0563277', 'Right sided abdominal pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0563278', 'Upper chest pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0564820', 'Pain in left arm');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0564821', 'Pain in right arm');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0564822', 'Pain in left leg');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0564823', 'Pain in right leg');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0574002', 'Edema of foot (finding)');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0574068', 'Rib pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0575090', 'Equilibration disorder');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0577100', 'Difficulty in ability to defecate');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0577573', 'Mass of body region');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0578046', 'Maxillary sinus pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0578050', 'Pain of lymph node');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0578454', 'Neck swelling');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0578687', 'Sore eye');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0581334', 'lump on leg');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0581358', 'Gastric spasm (disorder)');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0581394', 'Swollen legs');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0581870', 'Hunger pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0581879', 'Felt faint');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0581880', 'Morning headache');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0586407', 'Skin symptom');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0587054', 'Numbness of finger');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0596601', 'gastrointestinal gas');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0600142', 'Hot flushes');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0677500', 'Stinging Sensation');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0679309', 'physical symptom');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0683369', 'Clouded consciousness');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0687681', 'Feeling feverish');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0694551', 'Right lower quadrant pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0700153', 'Myotonus (finding)');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0700184', 'Throat irritation');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0700590', 'Increased sweating');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0701824', 'Staggering gait');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0740396', 'chest burning');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0740418', 'Chronic back pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0740425', 'Altered Taste');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0740903', 'allergic symptom');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0741396', 'back pain mid back');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0741426', 'back symptoms');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0741548', 'bladder symptoms');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0741585', 'BODY ACHE');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0744002', 'finger contraction');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0744318', 'Acid reflux SYMPTOMS');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0744633', 'headache acute');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0744648', 'headache persistent');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0745411', 'irregular bleeding');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0746668', 'muscle pain chronic');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0746674', 'Generalized muscle weakness');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0746683', 'MUSCULOSKELETAL Chronic pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0746779', 'nausea chronic');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0747927', 'pregnancy signs');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0748706', 'side pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0750248', 'Chronic vertigo');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0750731', 'Body| Physical Appearance');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0751138', 'Myofacial Pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0751144', 'Fasciculation| Benign');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0751295', 'Memory Loss');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0751372', 'Nerve Pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0751407', 'Pain| Migratory');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0751409', 'Upper Extremity Paresis');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0751410', 'Lower Extremity Paresis');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0751492', 'Sciatica| Bilateral');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0751495', 'Seizures| Focal');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0751535', 'Syncope| Cardiogenic');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0751559', 'Pulsatile Tinnitus');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0751725', 'Posterior Cervical Pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0795691', 'HEART PROBLEM');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0795701', 'Neck cramps');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0812426', 'Kidney problem');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0838224', 'Pain in joint| forearm');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0839476', 'Pain in upper arm');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0839480', 'Pain in limb| lower leg');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0847550', 'red nose');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0847554', 'lump in throat');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0848051', 'lumps behind ears');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0848168', 'out (of) breath');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0848178', 'bad nerves');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0848241', 'weight problem');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0848259', 'male puberty');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0848277', 'room spinning');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0848283', 'rundown');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0848290', 'sick to stomach');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0848332', 'Spots on skin');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0848400', 'weight loss problem');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0848404', 'weight gain problem');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0848464', 'clogged ear');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0848633', 'sinus pressure');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0848641', 'rash lips');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0848720', 'prostate problem');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0848724', 'circulation problem');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0849370', 'blemishes');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0849668', 'peri-menopausal');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0849759', 'charmed');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0849791', 'sinus drainage');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0849796', 'ear congestion');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0849824', 'change (in) bowel movements');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0849850', 'blotch');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0849852', 'skin bump');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0849907', 'Itching of ear');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0849911', 'ear popping');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0849959', 'feeling dizzy');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0849963', 'Feeling nervous');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0849967', 'feeling run down');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0849970', 'Feeling tired');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0849986', 'foreskin swelling');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0850015', 'unwanted hair');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0850045', 'intestinal pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0850149', 'Dry cough');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0850630', 'tingling in fingers');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0850674', 'Twitching eye');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0851121', 'digestive problem');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0853204', 'No Side Effect');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0853946', 'pain aggravated');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0856864', 'Headache fullness');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0857027', 'Feeling Sick');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0857051', 'bad dreams');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0857057', 'blotchy');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0857072', 'Shaking of hands');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0857073', 'cold hands & feet');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0857126', 'impending doom');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0857160', 'leg numbness');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0857172', 'persistent dry cough');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0857177', 'arthritic pains');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0857213', 'cramp in lower abdomen');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0857233', 'unable to focus');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0857245', 'Redness of face');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0857248', 'painful feet');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0857257', 'bloated feeling');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0857336', 'burning sensation in face');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0857516', 'floppy');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0858598', 'taste salty');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0858600', 'taste sweet');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0858665', 'stomach burning sensation of');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0858666', 'stomach dull pain of');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0858708', 'itch burning');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0858709', 'pruritus of both hands');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0858722', 'Facial twitching');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0858968', 'redness of legs');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0859371', 'Burning lips (sensation)');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0860277', 'sour stomach');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0863079', 'eyes stinging');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0863085', 'sore feet');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0863105', 'sore back');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0872410', 'Posturing');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0877113', 'Painful scar');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0877462', 'tingling mouth');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0877491', 'bumps tongue');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0877495', 'tingling tongue');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0877605', 'burning anal');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0877716', 'Burning sensation of leg');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0877717', 'Burning mouth (sensation)');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0917801', 'Sleeplessness');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0920154', 'spleen pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0920289', 'Sluggishness');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0946092', 'gas/bloating');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0947967', 'coma states');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0948094', 'laziness');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0948239', 'vomiting of medication');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0948396', 'Frequent headache');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0948521', 'itching mouth');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0948775', 'high weight');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C0949445', 'Cervical Dystonia');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C1096300', 'genital burning');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C1096446', 'slight fever');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C1096717', 'pain during injection');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C1257861', 'Colonic Inertia');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C1260880', 'Rhinorrhea');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C1274925', 'Skin-ache syndrome');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C1282310', 'Intermittent pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C1291077', 'Abdominal bloating');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C1306878', 'Menopausal discomfort');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C1321587', 'Breathing abnormally deep');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C1321898', 'Blood in stool');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C1377828', 'Paraneoplastic Opsoclonus Ataxia');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C1384493', 'Catarrh');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C1397014', 'Imbalance');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C1442877', 'Sore skin');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C1443924', 'Severe diarrhea');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C1446787', 'Cramping sensation quality');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C1517205', 'Flare');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C1579838', 'Sore mouth');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C1579931', 'Depressed - symptom');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C1704205', 'Pharyngeal swelling');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C1704276', 'Spasmodic movement');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C1705500', 'Flasher - visual manifestation');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C1718341', 'Soft tissue pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C1744601', 'Abnormal heart beat');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C1960719', 'Pain characterized by provoking factor');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2016599', 'pain between shoulder blades');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2032151', 'Pain in bilateral legs');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2032351', 'Pain in left hand');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2032395', 'pelvic pain on the left');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2032420', 'Pain in right hand');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2116289', 'neck Muscle Tension');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2126129', 'constant Tinnitus');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2126231', 'light bleeding between periods (symptom)');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2129214', 'Loose stool');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2141922', 'Pain in left hip');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2142181', 'Pain in left knee');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2169806', 'recurrent muscle twitches (symptom)');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2188199', 'Continuing headache');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2199592', 'earache of right ear');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2202100', 'Pain in right hip joint');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2202235', 'Pain in right knee');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2203300', 'worse headaches');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2220048', 'Bilateral knee pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2220248', 'severe Earache');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2242996', 'Has tingling sensation');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2364111', 'Ageusia');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2364135', 'Actual Discomfort');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2370950', 'Aural pressure');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2830454', 'Other fatigue');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2896456', 'Pain in left thigh');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2945698', 'panic symptoms');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2957106', 'headache severe');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C2985336', 'Urge to Push');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C3179196', 'Myofascial Trigger Point Pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C3257803', 'Watery eyes');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C3640009', 'Annoying Pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C3640011', 'Miserable Pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C3640014', 'Unbearable Pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C3640015', 'Hurting Pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C3665346', 'Unspecified visual loss');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C3714552', 'Weakness');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C3839047', 'Severe dry skin');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C3853138', 'Very mild pain');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C3900051', 'Amotivation');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C4024610', 'Leg muscle stiffness');
INSERT INTO ontology.symptoms (symptom_id, description) VALUES ('C4042866', 'Symptom Flare Up'); |
DROP DATABASE IF EXISTS ems_db;
CREATE database ems_db;
USE ems_db;
CREATE TABLE department (
id INT NOT NULL AUTO_INCREMENT,
department VARCHAR(30) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE role (
id INT NOT NULL AUTO_INCREMENT,
title VARCHAR(30) NOT NULL,
salary DECIMAL NOT NULL,
department_id INT NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE employee (
id INT NOT NULL AUTO_INCREMENT,
first_name VARCHAR(30) NOT NULL,
last_name VARCHAR(30) NOT NULL,
role_id INT NOT NULL,
manager_id INT NULL,
PRIMARY KEY (id)
); |
-- cond 1
SELECT empno, ename,
CASE WHEN deptno = 10 THEN 'ACCOUNTING'
WHEN deptno = 20 THEN 'RESEARCH'
WHEN deptno = 30 THEN 'SALES'
WHEN deptno = 40 THEN 'OPERATIONS'
ELSE 'DDIT'
END DNAME
FROM emp;
-- cond 2
-- 올해년도가 짝수이면
-- 입사년도가 짝수일 때 건강검진 대상자
-- 입사년도가 홀수일 때 건강검진 비대상자
-- 올해년도가 홀수이면
-- 입사년도가 짝수일 때 건강검진 비대상자
-- 입사년도가 홀수일 때 건강검진 대상자
-- 올해년도가 짝수인지, 홀수인지 확인
-- DATE 타입 -> 문자열(여러가지 포맷, YYYY-MM-DD HH24:MI:SS)
-- 짝수 -> 2로 나눴을때 나머지 0
-- 홀수 -> 2로 나눴을때 나머지 1
SELECT MOD(TO_NUMBER(TO_CHAR(SYSDATE, 'YYYY')), 2)
FROM dual;
SELECT empno, ename, hiredate,
MOD(TO_NUMBER(TO_CHAR(hiredate, 'YYYY')), 2)hire,
MOD(TO_NUMBER(TO_CHAR(SYSDATE, 'YYYY')), 2),
CASE
WHEN MOD(TO_NUMBER(TO_CHAR(hiredate, 'YYYY')), 2) = MOD(TO_NUMBER(TO_CHAR(SYSDATE, 'YYYY')), 2)
THEN '건강검진 대상자'
ELSE '건강검진 비대상자'
END CONTATCT_TO_DOCTOR
FROM emp;
-- GROUP BY 행을 묶을 기준
-- 부서번호 같은 ROW 끼리 묶는 경우 : GROUP BY deptno
-- 담당업무 같은 ROW 끼리 묶는 경우 : GROUP BY job
-- MGR가 같고 담당업무가 같은 ROW 끼리 묶는 경우 : GROUP BY mgr, job
-- 그룹함수의 종류
-- SUM : 합계
-- COUNT : 갯수 -NULL 값이 아닌 ROW의 갯수)
-- MAX : 최대값
-- MIN : 최소값
-- AVG : 평균
-- 그룹함수의 특징
-- 해당 컬럼에 NULL값을 갖는 ROW가 존재할 경우 해당 값은 무시하고 계산한다 (NULL 연산의 결과는 null)
-- 부서별 급여 합
-- 그룹함수 주위점
-- GROUP BY 절에 나온 컬럼이외의 다른컬럼이 SELECT절에 표현되면 에러
SELECT deptno, ename,
SUM(sal) sum_sal, MAX(sal) max_sal, MIN(sal), ROUND(AVG(sal),2), COUNT(sal)
FROM emp
GROUP BY deptno, ename;
-- GROUP BY 절이 없는 상태에서 그룹함수를 사용한 경우
-- --> 전체행을 하나의 행으로 묶는다
SELECT SUM(sal) sum_sal, MAX(sal) max_sal, MIN(sal), ROUND(AVG(sal),2),
COUNT(sal), -- sal 컬럼의 값이 null이 아닌 row의 갯수
COUNT(comm), -- COMM 컬럼의 값이 null이 아닌 row의 갯수
COUNT(*) -- 몇건의 데이터가 있는지
FROM emp;
-- GROUP BY의 기준이 empno이면 결과수가 몇건??
-- 그룹화와 관련없는 임의의 문자열, 함수, 숫자등은 SELCET절에 나오는 것이 가능
SELECT SUM(sal) sum_sal, MAX(sal) max_sal, MIN(sal), ROUND(AVG(sal),2),
COUNT(sal),
COUNT(comm),
COUNT(*)
FROM emp
GROUP BY empno;
-- SINGLE ROW FUNCTION의 경우 WHERE 절에서 사용하는 것이 가능하나
-- MULTI ROW FUNCTION (GROUP FUNCTION)의 경우 WHERE 절에서 사용하는 것이 불가능 하고
-- HAVING 절에서 조건을 기술한다
-- 부서별 급여 합 조회, 단 급여합이 9000이상인 row만 조회
-- deptno, 급여합
SELECT deptno, SUM(sal) sum_sal
FROM emp
GROUP BY deptno
HAVING SUM(sal) > 9000;
-- grp1
SELECT MAX(sal) max_sal, MIN(sal)min_sal, ROUND(AVG(sal),2) avg_sal, SUM(sal) sum_sal, COUNT(sal)count_sal,
COUNT(mgr)count_mgr, COUNT(*)count_all
FROM emp;
-- grp2
SELECT deptno,
MAX(sal) max_sal, MIN(sal)min_sal, ROUND(AVG(sal),2) avg_sal, SUM(sal) sum_sal, COUNT(sal)count_sal,
COUNT(mgr)count_mgr, COUNT(*)count_all
FROM emp
GROUP BY deptno;
-- grp3
SELECT
CASE WHEN deptno = 10 THEN 'ACCOUNTING'
WHEN deptno = 20 THEN 'RESEARCH'
WHEN deptno = 30 THEN 'SALES'
END dname,
MAX(sal) max_sal, MIN(sal)min_sal, ROUND(AVG(sal),2) avg_sal, SUM(sal) sum_sal, COUNT(sal)count_sal,
COUNT(mgr)count_mgr, COUNT(*)count_all
FROM emp
GROUP BY deptno
ORDER BY deptno;
-- grp4
-- ORACLE 9i 이전 까지는 GROUP BY절에 기술한 컬럼으로 정렬을 보정
-- ORACLE 10G 이후 부터는 GROUP BY절에 기술한 컬럼으로 정렬을 보장 하지 않는다 (GROUP BY 연산시 속도 UP)
SELECT TO_CHAR(hiredate, 'YYYYMM')hire_YYYYMM, COUNT(TO_CHAR(hiredate, 'YYYYMM'))cnt
FROM emp
GROUP BY TO_CHAR(hiredate, 'YYYYMM')
ORDER BY TO_CHAR(hiredate, 'YYYYMM');
-- grp 5
SELECT TO_CHAR(hiredate, 'YYYY')hire_YYYY, COUNT(TO_CHAR(hiredate, 'YYYY'))cnt
FROM emp
GROUP BY TO_CHAR(hiredate, 'YYYY')
ORDER BY TO_CHAR(hiredate, 'YYYY');
-- grp 6
SELECT COUNT(*)cnt
FROM dept;
-- grp 7
-- 부서가 뭐가 있는지 : 10, 20, 30 --> 3개의 row가 존재
-- >테이블의 row 수를 조회 : GROUP BY 없이 COUNT(*)
-- 배열
SELECT COUNT(*)cnt
FROM
(SELECT deptno, COUNT(deptno) cnt
FROM emp
GROUP BY deptno);
|
# 游戏网关列表
drop table if exists `gateinfo`;
create table `gateinfo` (
`zoneid` int(10) unsigned not null,
`ip` int(10) unsigned not null,
`port` int(10) unsigned not null,
`onlinenum` int(10) unsigned not null,
`ipstr` varchar(32) character set utf8mb4 COLLATE utf8mb4_bin not null,
index zoneid(zoneid),
index onlinenum(onlinenum),
primary key ip_port (`ip`, `port`)
) engine=InnoDB default charset=utf8mb4 COLLATE utf8mb4_bin;
|
INSERT INTO player (name , class, player_id, rank, wins, losses, games_played, challenged, opp_id, friendly_game)
VALUES
('Kavdi','this class','AAAAAAAAA',1,0,0,0,0, null, 0),
('Sue','this class','BBBBBBBBB',2,0,0,0,0, null, 0),
('Matt','this class','CCCCCCCCC',3,0,0,0,0, null, 0),
('Nate','this class','DDDDDDDDD',4,0,0,0,0, null, 0),
('Shayne','this class','EEEEEEEEE',5,0,0,0,0, null, 0),
('Paul','this class','FFFFFFFFF',6,0,0,0,0, null, 0),
('Pam','this class','GGGGGGGGG',7,0,0,0,0, null, 0),
('Mike','this class','HHHHHHHHH',8,0,0,0,0, null, 0),
('David','this class','IIIIIIIII',9,0,0,0,0, null, 0),
('Nick','this class','JJJJJJJJJ',10,0,0,0,0, null, 0),
('Jen','this class','KKKKKKKKK',11,0,0,0,0, null, 0),
('Romeo','this class','LLLLLLLLL',11,0,0,0,0, null, 0),
('Will','this class','MMMMMMMMM',11,0,0,0,0, null, 0),
('Mary','this class','NNNNNNNNN',11,0,0,0,0, null, 0),
('Jerome','this class','OOOOOOOOO',11,0,0,0,0, null, 0),
('John','this class','PPPPPPPPP',11,0,0,0,0, null, 0),
('Carol','this class','QQQQQQQQQ',11,0,0,0,0, null, 0),
('Gabe','this class','RRRRRRRRR',11,0,0,0,0, null, 0);
|
/*
* Author: David Salac
* Project: Diploma Thesis (2017)
* Title: This is file with SQL table definitions and initial data of system
*/
/* Table user defines users of system */
CREATE TABLE user (
user_name VARCHAR(120) NOT NULL,
user_privilege ENUM('admin', 'user') NOT NULL,
user_description VARCHAR(256),
user_password_hash VARCHAR(50),
PRIMARY KEY(user_name)
) Engine=InnoDb;
/* INSERT FIRST ADMIN USER: */
INSERT INTO user VALUES('admin', 'admin', 'Website admin', '929590399ec4491050d3fd8cd33fe9585cf64410'); /* login:admin; password:a1b456 */
/* Table log record every log-in to system */
CREATE TABLE log (
log_privilege ENUM('admin', 'user') NOT NULL,
log_time TIMESTAMP NOT NULL,
log_user VARCHAR(120) NOT NULL,
FOREIGN KEY (log_user) REFERENCES user(user_name) ON DELETE CASCADE,
PRIMARY KEY(log_privilege, log_time, log_user)
) Engine=InnoDb;
/* Table of system task */
CREATE TABLE task (
task_id INT NOT NULL AUTO_INCREMENT,
task_time CHAR(21) NOT NULL,
task_last_active CHAR(21) NULL,
task_priority ENUM('suspend', 'low', 'medium', 'high') NOT NULL,
task_type ENUM('rsa', 'elgamal', 'dh') NOT NULL,
task_solved BOOLEAN NOT NULL,
task_solving_time INT,
task_solving_station INT,
task_rsa_n TEXT,
task_rsa_e TEXT,
task_rsa_c TEXT,
task_rsa_m TEXT,
task_rsa_d TEXT,
task_elgamal_p TEXT,
task_elgamal_g TEXT,
task_elgamal_h TEXT,
task_elgamal_c1 TEXT,
task_elgamal_c2 TEXT,
task_elgamal_x TEXT,
task_elgamal_m TEXT,
task_dh_p TEXT,
task_dh_g TEXT,
task_dh_pow_a TEXT,
task_dh_pow_b TEXT,
task_dh_a TEXT,
task_dh_common_key TEXT,
PRIMARY KEY(task_id)
) Engine=InnoDb;
/* Table of system station */
CREATE TABLE station (
station_id INT NOT NULL AUTO_INCREMENT,
station_created CHAR(21) NOT NULL,
station_last_activity CHAR(21) NULL,
station_task INT NULL,
PRIMARY KEY(station_id),
FOREIGN KEY (station_task) REFERENCES task (task_id)
) Engine=InnoDb;
|
-- *********************************************
-- * Standard SQL generation
-- *--------------------------------------------
-- * DB-MAIN version: 9.2.0
-- * Generator date: Oct 16 2014
-- * Generation date: Thu Nov 26 14:36:16 2015
-- * LUN file: E:\MedecineTravail(refait) (2).lun
-- * Schema: Bi-BDEDE REL/SQL2
-- *********************************************
--Drop section
--_____________
DROP TABLE exposition;
DROP TABLE risque_examen;
DROP TABLE Risque;
DROP TABLE examenObligatoire;
DROP TABLE Examen;
DROP TABLE Emploi;
DROP TABLE Personne;
DROP TABLE Entreprise;
-- Database Section
-- ________________
-- DBSpace Section
-- _______________
-- Tables Section
-- _____________
create table Emploi (
idEmploi int IDENTITY(1,1) not null,
libelle varchar(60) not null,
dateEntree date not null,
matricule int not null,
numEnt int not null,
dateSortie date,
constraint ID_Emploi_ID primary key (idEmploi),
constraint SID_Emploi_ID unique (dateEntree, numEnt, matricule));
create table Entreprise (
numEnt int IDENTITY(1,1) not null,
denomination varchar(60) not null,
tel varchar(15) not null,
rue varchar(60) not null,
numRue int not null,
codePostal int not null,
localite varchar(60) not null,
constraint ID_Entreprise_ID primary key (numEnt));
create table Examen (
idExam int IDENTITY(1,1) not null,
libelle varchar(60) not null,
constraint ID_Examen_ID primary key (idExam));
create table examenObligatoire (
idExamenObli int IDENTITY(1,1) not null,
idEmploi int not null,
idExam int not null,
constraint ID_examenObligatoire_ID primary key (idExamenObli),
constraint SID_examenObligatoire_ID unique (idExam, idEmploi));
create table exposition (
idExposition int IDENTITY(1,1) not null,
idRisque int not null,
idEmploi int not null,
constraint ID_exposition_ID primary key (idExposition),
constraint SID_exposition_ID unique (idRisque, idEmploi));
create table Personne (
matricule int IDENTITY(1,1) not null,
nom varchar(26) not null,
numDossierMed int not null,
rue varchar(60) not null,
numRue int not null,
codePostal int not null,
localite varchar(60) not null,
constraint ID_Personne_ID primary key (matricule));
create table Risque (
idRisque int IDENTITY(1,1) not null,
libelle varchar(60) not null,
constraint ID_Risque_ID primary key (idRisque));
create table risque_examen (
idRisqueExamen int IDENTITY(1,1) not null,
idRisque int not null,
idExam int not null,
constraint ID_risque_examen_ID primary key (idRisqueExamen),
constraint SID_risque_examen_ID unique (idRisque, idExam));
-- Constraints Section
-- ____________________
alter table Emploi add constraint EQU_Emplo_Perso_FK
foreign key (matricule)
references Personne;
alter table Emploi add constraint REF_Emplo_Entre_FK
foreign key (numEnt)
references Entreprise;
alter table examenObligatoire add constraint REF_exame_Emplo_FK
foreign key (idEmploi)
references Emploi;
alter table examenObligatoire add constraint REF_exame_Exame
foreign key (idExam)
references Examen;
alter table exposition add constraint REF_expos_Risqu
foreign key (idRisque)
references Risque;
alter table exposition add constraint REF_expos_Emplo_FK
foreign key (idEmploi)
references Emploi;
alter table risque_examen add constraint EQU_risqu_Risqu
foreign key (idRisque)
references Risque;
alter table risque_examen add constraint REF_risqu_Exame_FK
foreign key (idExam)
references Examen;
-- Index Section
-- _____________
create unique index ID_Emploi_IND
on Emploi (idEmploi);
create unique index SID_Emploi_IND
on Emploi (dateEntree, numEnt, matricule);
create index EQU_Emplo_Perso_IND
on Emploi (matricule);
create index REF_Emplo_Entre_IND
on Emploi (numEnt);
create unique index ID_Entreprise_IND
on Entreprise (numEnt);
create unique index ID_Examen_IND
on Examen (idExam);
create unique index ID_examenObligatoire_IND
on examenObligatoire (idExamenObli);
create unique index SID_examenObligatoire_IND
on examenObligatoire (idExam, idEmploi);
create index REF_exame_Emplo_IND
on examenObligatoire (idEmploi);
create unique index ID_exposition_IND
on exposition (idExposition);
create unique index SID_exposition_IND
on exposition (idRisque, idEmploi);
create index REF_expos_Emplo_IND
on exposition (idEmploi);
create unique index ID_Personne_IND
on Personne (matricule);
create unique index ID_Risque_IND
on Risque (idRisque);
create unique index ID_risque_examen_IND
on risque_examen (idRisqueExamen);
create unique index SID_risque_examen_IND
on risque_examen (idRisque, idExam);
create index REF_risqu_Exame_IND
on risque_examen (idExam);
-- Insert section
--_______________
insert into Entreprise values('Elect Struct & co', '081/404404', 'rue des eclairs au chocolat', 203, 5000, 'Namur');
insert into Entreprise values('Françoise Coiffure', '081/450171', 'Rue Celestin', 93, 5150, 'Floreffe');
insert into Entreprise values('To be tri', '041/196318', 'Rue de Liège', 2,4100,'Seraing');
insert into Personne values('Diane Dufaux', 5546879, 'Rue saint martin', 72, 5150, 'Floreffe');
insert into Personne values('Justin Vancutsem', 6995433, 'Rue saint Pierre', 92, 5000, 'namur');
insert into Personne values('Maxime Renard', 5224695, 'Rue Du Loup', 112, 1300, 'Wavre');
insert into Personne values('Xavier Delieu', 2568973, 'Rue des Houblonières', 21, 7500, 'Tournai');
insert into Personne values('Sylvain Lamouline', 1125988, 'Rue Salzine Les Moulins', 150, 5001, 'Belgrade');
insert into Emploi values('Ebeniste','14.01.2014', 1, 1, null);
insert into Emploi values('Ebeniste','28.03.2014', 2, 2, null);
insert into Emploi values('Menuisier','13.03.2015', 3, 3, null);
insert into Emploi values('Electricien','01.05.2014', 4, 2, null);
insert into Emploi values('Technicien Informaticien','03.10.2015', 5, 1, null);
insert into Examen values('Examen de santé');
insert into Examen values('Examen de la vue');
insert into Examen values('Examen des mains');
insert into Examen values('Examen cardiologique');
insert into Examen values('Examen respiratoire');
insert into Examen values('Examen des oreilles');
insert into Examen values('Prise de sang');
insert into Examen values('Examen des réflexes');
insert into Examen values('Examen psychologique');
insert into Risque values('Electrocution');
insert into Risque values('Coupure');
insert into Risque values('Brulure');
insert into Risque values('Blessure du dos');
insert into Risque values('Chute');
insert into Risque_examen values(1, 1);
insert into Risque_examen values(1, 2);
insert into Risque_examen values(1, 4);
insert into Risque_examen values(1, 8);
insert into Risque_examen values(1, 9);
insert into Risque_examen values(2, 1);
insert into Risque_examen values(2, 3);
insert into Risque_examen values(3, 1);
insert into Risque_examen values(3, 4);
insert into Risque_examen values(3, 5);
insert into Risque_examen values(3, 9);
insert into Risque_examen values(4, 1);
insert into Risque_examen values(4, 8);
insert into Risque_examen values(4, 9);
insert into Risque_examen values(5, 1);
insert into Risque_examen values(5, 9);
insert into exposition values (2, 1);
insert into exposition values (2, 2);
insert into exposition values (2, 3);
insert into exposition values (4, 3);
insert into exposition values (1, 4);
insert into exposition values (2, 4);
insert into exposition values (3, 4);
insert into exposition values (4, 4);
insert into exposition values (4, 5);
insert into examenObligatoire values(1, 1);
insert into examenObligatoire values(2, 1);
insert into examenObligatoire values(1, 2);
insert into examenObligatoire values(2, 2);
insert into examenObligatoire values(1, 3);
insert into examenObligatoire values(2, 3);
insert into examenObligatoire values(1, 4);
insert into examenObligatoire values(3, 4);
insert into examenObligatoire values(1, 5); |
INSERT INTO idioma (nom_idioma) VALUES
('Español'),
('Zapoteco'),
('Inglés'),
('Náhuatl'),
('Tojolabal'),
('Totonaca'),
('Portugués');
|
/* indexcode: i_so_4310_b_fk */
create index i_so_4310_b_fk on so_salequotation_b (pk_salequotation asc)
/
/* indexcode: i_so_4310_code */
create index i_so_4310_code on so_salequotation (vbillcode asc)
/
/* indexcode: i_so_4310_date */
create index i_so_4310_date on so_salequotation (dquotedate asc,
pk_org asc)
/
/* indexcode: i_so_4310_cust */
create index i_so_4310_cust on so_salequotation (pk_customer asc,
pk_org asc)
/
|
ALTER TABLE DocReceiveUnit ADD canceled char(1) NULL
/ |
CREATE STREAM x509_stream ( \
x509 struct< \
ts DOUBLE(16,6), \
id STRING, \
certificate_version INTEGER, \
certificate_serial STRING, \
certificate_subject VARCHAR, \
certificate_issuer VARCHAR, \
certificate_not_valid_before INTEGER, \
certificate_not_valid_after INTEGER, \
certificate_key_alg STRING, \
certificate_sig_alg STRING, \
certificate_key_type STRING, \
certificate_key_length INTEGER, \
certificate_exponent INTEGER, \
basic_constraints_ca BOOLEAN, \
basic_constraints_path_len INTEGER>) \
WITH (KAFKA_TOPIC='x509', VALUE_FORMAT='JSON'); |
DROP TABLE CUSTOMER_PORTFOLIO_UL_CALC_SUMMARY;
CREATE TABLE CUSTOMER_PORTFOLIO_UL_CALC_SUMMARY
(
CUST_ID VARCHAR2(50),
PORTFOLIO_UL_CUST_SUM DECIMAL(10,2),
PORTFOLIO_UL_TOTAL_SUM DECIMAL(10,2),
REPORTING_DATE VARCHAR2(50),
VERSION INTEGER
);
|
CREATE TABLE submission_seniormetareview (
submission_id INTEGER NOT NULL,
reviewer_id INTEGER NOT NULL,
PRIMARY KEY (submission_id, reviewer_id),
FOREIGN KEY(submission_id) REFERENCES submission (id),
FOREIGN KEY(reviewer_id) REFERENCES people (id)
)
|
-- Procedure addMessage(id_sender, id_target, message, fecha, is_premium, @message, @ecode, @emsg)
-- Codigos devueltos:
-- 1 - LIMITE DE MENSAJES
-- 2 - LIMITE DE CHATS
DELIMITER $$
USE desa_byo$$
DROP PROCEDURE addMessage$$
CREATE PROCEDURE addMessage(
in p_id_sender int(11),
in p_id_target int(11),
in p_message varchar(255),
in p_fecha datetime,
in p_is_premium boolean,
out out_message_id int(11),
out out_ecode tinyint(3),
out out_emsg varchar(32)
)
BEGIN
DECLARE totalMensajes int(3);
DECLARE totalChats int(3);
DECLARE maxMensajes DOUBLE;
DECLARE maxChats DOUBLE;
DECLARE chatIniciado int(11);
CASE p_is_premium
WHEN TRUE THEN
INSERT INTO mensajes(id_sender, id_target, messages, fecha, is_viewed)
VALUES(p_id_sender, p_id_target, p_message, p_fecha, FALSE);
SET out_message_id = LAST_INSERT_ID();
SELECT count(last_message_id) INTO chatIniciado FROM chats WHERE (id_user_sender = p_id_target AND id_user_requester = p_id_sender) OR (id_user_requester = p_id_target AND id_user_sender = p_id_sender);
IF chatIniciado > 0 THEN
UPDATE chats SET last_message_id = out_message_id WHERE (id_user_sender = p_id_target AND id_user_requester = p_id_sender) OR (id_user_requester = p_id_target AND id_user_sender = p_id_sender);
ELSE
INSERT INTO chats(id_user_requester, id_user_sender, last_message_id)
VALUES(p_id_sender, p_id_target, out_message_id);
END IF;
ELSE
SELECT mensajes, chats INTO totalMensajes, totalChats FROM interacciones WHERE id_user = p_id_sender;
SELECT valor INTO maxMensajes FROM general_configurations WHERE id = 4;
IF maxMensajes <= totalMensajes THEN
SET out_ecode = 1;
SET out_emsg = 'LIMITE DE MENSAJES';
ELSE
INSERT INTO desa_byo.interacciones(id_user, mensajes, solicitudes, chats)
VALUES (p_id_sender, 1, 0, 0)
ON DUPLICATE KEY UPDATE
mensajes = mensajes+1;
SELECT count(last_message_id) INTO chatIniciado FROM chats WHERE(id_user_sender = p_id_target AND id_user_requester = p_id_sender) OR (id_user_requester = p_id_target AND id_user_sender = p_id_sender);
if chatIniciado > 0 THEN
SELECT valor INTO maxChats FROM general_configurations WHERE id = 6;
IF totalChats >= maxChats THEN
SET out_ecode = 2;
SET out_emsg = 'LIMITE DE CHATS';
ELSE
INSERT INTO mensajes(id_sender, id_target, messages, fecha, is_viewed)
VALUES(p_id_sender, p_id_target, p_message, p_fecha, FALSE);
SET out_message_id = LAST_INSERT_ID();
UPDATE chats SET last_message_id = out_message_id WHERE (id_user_sender = p_id_target AND id_user_requester = p_id_sender) OR (id_user_requester = p_id_target AND id_user_sender = p_id_sender);
END IF;
ELSE
SELECT valor INTO maxChats FROM general_configurations WHERE id = 6;
IF totalChats >= maxChats THEN
SET out_ecode = 2;
SET out_emsg = 'LIMITE DE CHATS';
ELSE
INSERT INTO mensajes(id_sender, id_target, messages, fecha, is_viewed)
VALUES(p_id_sender, p_id_target, p_message, p_fecha, FALSE);
SET out_message_id = LAST_INSERT_ID();
INSERT INTO chats(id_user_requester, id_user_sender, last_message_id)
VALUES(p_id_sender, p_id_target, out_message_id);
UPDATE interacciones SET mensajes = mensajes + 1, chats = chats + 1 WHERE id_user = p_id_sender;
END IF;
END IF;
END IF;
END CASE;
END $$
DELIMITER ; |
--
-- FUO_TPFU_DIR (Directory)
--
CREATE OR REPLACE DIRECTORY
FUO_TPFU_DIR AS
'/data02/unit_offer/test_pe_free/process_dir';
|
SET SEARCH_PATH TO public;
--Basic table layout for database
CREATE TABLE users
(
id SERIAL PRIMARY KEY,
username VARCHAR(30) UNIQUE NOT NULL,
pw TEXT NOT NULL,
perms CHARACTER(4) DEFAULT 'USER' NOT NULL
);
CREATE TABLE posts
(
id SERIAL PRIMARY KEY,
title VARCHAR(50) UNIQUE NOT NULL,
description VARCHAR(500) NOT NULL,
approved BOOLEAN NOT NULL DEFAULT false
); |
-- online distros per host
with m as (
select response_id, online
from metadata_completeness,
json_array_elements(distributions->'online') online
)
select r.host, count(m.online) as num_hrefs
from responses r join m on m.response_id = r.id
group by r.host
order by num_hrefs DESC; |
drop table if EXISTS log_Company;
create table log_Company (
action VARCHAR(20),
name VARCHAR(40),
registrationDate DATE,
creditAmount INT,
quitDate DATE,
centralOfficeID INT,
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
--***************************************
drop trigger if exists log_delete_Company;
DELIMITER $$
CREATE TRIGGER log_delete_Company
after DELETE ON Company FOR EACH ROW
BEGIN
INSERT INTO log_Company VALUES ('DELETE', OLD.name, OLD.registrationDate, OLD.creditAmount, OLD.quitDate, OLD.centralOfficeID, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
drop trigger if exists log_update_Company;
DELIMITER $$
CREATE TRIGGER log_update_Company
after UPDATE ON Company FOR EACH ROW
BEGIN
INSERT INTO log_Company VALUES ('UPDATE', NEW.name, NEW.registrationDate, NEW.creditAmount, NEW.quitDate, NEW.centralOfficeID, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop trigger if exists log_insert_Company;
DELIMITER $$
CREATE TRIGGER log_insert_Company
after INSERT ON Company FOR EACH ROW
BEGIN
INSERT INTO log_Company VALUES ('INSERT', NEW.name, NEW.registrationDate, NEW.creditAmount, NEW.quitDate, NEW.centralOfficeID, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop table if EXISTS log_Branch;
create table log_Branch (
action VARCHAR(20),
ID INT,
name VARCHAR(40),
companyName VARCHAR(40),
manamgerFirstName VARCHAR(40),
manamgerLastName VARCHAR(40),
mainPhoneNumber VARCHAR(40),
mainAddress VARCHAR(40) ,
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
--***************************************
drop trigger if exists log_delete_Branch;
DELIMITER $$
CREATE TRIGGER log_delete_Branch
after DELETE ON Branch FOR EACH ROW
BEGIN
INSERT INTO log_Branch VALUES ('DELETE', OLD.ID, OLD.name, OLD.companyName, OLD.manamgerFirstName, OLD.manamgerLastName, OLD.mainPhoneNumber, OLD.mainAddress, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
drop trigger if exists log_update_Branch;
DELIMITER $$
CREATE TRIGGER log_update_Branch
after UPDATE ON Branch FOR EACH ROW
BEGIN
INSERT INTO log_Branch VALUES ('UPDATE', NEW.ID, NEW.name, NEW.companyName, NEW.manamgerFirstName, NEW.manamgerLastName, NEW.mainPhoneNumber, NEW.mainAddress, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop trigger if exists log_insert_Branch;
DELIMITER $$
CREATE TRIGGER log_insert_Branch
after INSERT ON Branch FOR EACH ROW
BEGIN
INSERT INTO log_Branch VALUES ('INSERT', NEW.ID, NEW.name, NEW.companyName, NEW.manamgerFirstName, NEW.manamgerLastName, NEW.mainPhoneNumber, NEW.mainAddress, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop table if EXISTS log_Branch_PhoneNumber;
create table log_Branch_PhoneNumber (
action VARCHAR(20),
BranchID int,
phoneNumber VARCHAR(40),
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
--***************************************
drop trigger if exists log_delete_Branch_PhoneNumber;
DELIMITER $$
CREATE TRIGGER log_delete_Branch_PhoneNumber
after DELETE ON Branch_PhoneNumber FOR EACH ROW
BEGIN
INSERT INTO log_Branch_PhoneNumber VALUES ('DELETE', OLD.BranchID, OLD.phoneNumber, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop trigger if exists log_update_Branch_PhoneNumber;
DELIMITER $$
CREATE TRIGGER log_update_Branch_PhoneNumber
after UPDATE ON Branch_PhoneNumber FOR EACH ROW
BEGIN
INSERT INTO log_Branch_PhoneNumber VALUES ('UPDATE', NEW.BranchID, NEW.phoneNumber, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop trigger if exists log_insert_Branch_PhoneNumber;
DELIMITER $$
CREATE TRIGGER log_insert_Branch_PhoneNumber
after INSERT ON Branch_PhoneNumber FOR EACH ROW
BEGIN
INSERT INTO log_Branch_PhoneNumber VALUES ('INSERT', NEW.BranchID, NEW.phoneNumber, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop table if EXISTS log_Branch_Address;
create table log_Branch_Address (
action VARCHAR(20),
BranchID int,
address VARCHAR(60),
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
--***************************************
drop trigger if exists log_delete_Branch_Address;
DELIMITER $$
CREATE TRIGGER log_delete_Branch_Address
after DELETE ON Branch_Address FOR EACH ROW
BEGIN
INSERT INTO log_Branch_Address VALUES ('DELETE', OLD.BranchID, OLD.address, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop trigger if exists log_update_Branch_Address;
DELIMITER $$
CREATE TRIGGER log_update_Branch_Address
after UPDATE ON Branch_Address FOR EACH ROW
BEGIN
INSERT INTO log_Branch_Address VALUES ('UPDATE', NEW.BranchID, NEW.address, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop trigger if exists log_insert_Branch_Address;
DELIMITER $$
CREATE TRIGGER log_insert_Branch_Address
after INSERT ON Branch_Address FOR EACH ROW
BEGIN
INSERT INTO log_Branch_Address VALUES ('INSERT', NEW.BranchID, NEW.address, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop table if EXISTS log_agencySpecialist;
create table log_agencySpecialist (
action VARCHAR(20),
firstName VARCHAR(40),
lastName VARCHAR(40),
socialSecurityNumber VARCHAR(40),
mainPhoneNumber VARCHAR(40),
mainAddress VARCHAR(60),
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
--***************************************
drop trigger if exists log_delete_agencySpecialist;
DELIMITER $$
CREATE TRIGGER log_delete_agencySpecialist
after DELETE ON agencySpecialist FOR EACH ROW
BEGIN
INSERT INTO log_agencySpecialist VALUES ('DELETE', OLD.firstName, OLD.lastName, OLD.socialSecurityNumber, OLD.mainPhoneNumber, OLD.mainAddress, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop trigger if exists log_update_agencySpecialist;
DELIMITER $$
CREATE TRIGGER log_update_agencySpecialist
after UPDATE ON agencySpecialist FOR EACH ROW
BEGIN
INSERT INTO log_agencySpecialist VALUES ('UPDATE', NEW.firstName, NEW.lastName, NEW.socialSecurityNumber, NEW.mainPhoneNumber, NEW.mainAddress, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop trigger if exists log_insert_agencySpecialist;
DELIMITER $$
CREATE TRIGGER log_insert_agencySpecialist
after INSERT ON agencySpecialist FOR EACH ROW
BEGIN
INSERT INTO log_agencySpecialist VALUES ('INSERT', NEW.firstName, NEW.lastName, NEW.socialSecurityNumber, NEW.mainPhoneNumber, NEW.mainAddress, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop table if EXISTS log_agencySpecialist_PhoneNumber;
create table log_agencySpecialist_PhoneNumber (
action VARCHAR(20),
agencySpecialistID VARCHAR(40),
phoneNumber VARCHAR(40),
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
--***************************************
drop trigger if exists log_delete_agencySpecialist_PhoneNumber;
DELIMITER $$
CREATE TRIGGER log_delete_agencySpecialist_PhoneNumber
after DELETE ON agencySpecialist_PhoneNumber FOR EACH ROW
BEGIN
INSERT INTO log_agencySpecialist_PhoneNumber VALUES ('DELETE', OLD.agencySpecialistID, OLD.phoneNumber, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop trigger if exists log_update_agencySpecialist_PhoneNumber;
DELIMITER $$
CREATE TRIGGER log_update_agencySpecialist_PhoneNumber
after UPDATE ON agencySpecialist_PhoneNumber FOR EACH ROW
BEGIN
INSERT INTO log_agencySpecialist_PhoneNumber VALUES ('UPDATE', NEW.agencySpecialistID, NEW.phoneNumber, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop trigger if exists log_insert_agencySpecialist_PhoneNumber;
DELIMITER $$
CREATE TRIGGER log_insert_agencySpecialist_PhoneNumber
after INSERT ON agencySpecialist_PhoneNumber FOR EACH ROW
BEGIN
INSERT INTO log_agencySpecialist_PhoneNumber VALUES ('INSERT', NEW.agencySpecialistID, NEW.phoneNumber, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop table if EXISTS log_agencySpecialist_Address;
create table log_agencySpecialist_Address (
action VARCHAR(20),
agencySpecialistID VARCHAR(40),
address VARCHAR(60),
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
--***************************************
drop trigger if exists log_delete_agencySpecialist_Address;
DELIMITER $$
CREATE TRIGGER log_delete_agencySpecialist_Address
after DELETE ON agencySpecialist_Address FOR EACH ROW
BEGIN
INSERT INTO log_agencySpecialist_Address VALUES ('DELETE', OLD.agencySpecialistID, OLD.address, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop trigger if exists log_update_agencySpecialist_Address;
DELIMITER $$
CREATE TRIGGER log_update_agencySpecialist_Address
after UPDATE ON agencySpecialist_Address FOR EACH ROW
BEGIN
INSERT INTO log_agencySpecialist_Address VALUES ('UPDATE', NEW.agencySpecialistID, NEW.address, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop trigger if exists log_insert_agencySpecialist_Address;
DELIMITER $$
CREATE TRIGGER log_insert_agencySpecialist_Address
after INSERT ON agencySpecialist_Address FOR EACH ROW
BEGIN
INSERT INTO log_agencySpecialist_Address VALUES ('INSERT', NEW.agencySpecialistID, NEW.address, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop table if EXISTS log_companyAgent;
create table log_companyAgent (
action VARCHAR(20),
ID int PRIMARY KEY,
companyName varchar(40),
firstName VARCHAR(40),
lastName VARCHAR(40),
mainPhoneNumber VARCHAR(40),
mainAddress VARCHAR(60),
registrationDate DATE,
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
--***************************************
drop trigger if exists log_delete_companyAgent;
DELIMITER $$
CREATE TRIGGER log_delete_companyAgent
after DELETE ON companyAgent FOR EACH ROW
BEGIN
INSERT INTO log_companyAgent VALUES ('DELETE',OLD.ID, OLD.companyName, OLD.firstName, OLD.lastName, OLD.mainPhoneNumber, OLD.mainAddress, OLD.registrationDate, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop trigger if exists log_update_companyAgent;
DELIMITER $$
CREATE TRIGGER log_update_companyAgent
after UPDATE ON companyAgent FOR EACH ROW
BEGIN
INSERT INTO log_companyAgent VALUES ('UPDATE', NEW.ID, NEW.companyName, NEW.firstName, NEW.lastName, NEW.mainPhoneNumber, NEW.mainAddress, NEW.registrationDate, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop trigger if exists log_insert_companyAgent;
DELIMITER $$
CREATE TRIGGER log_insert_companyAgent
after INSERT ON companyAgent FOR EACH ROW
BEGIN
INSERT INTO log_companyAgent VALUES ('INSERT', NEW.ID, NEW.companyName, NEW.firstName, NEW.lastName, NEW.mainPhoneNumber, NEW.mainAddress, NEW.registrationDate, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop table if EXISTS log_companyAgent_PhoneNumber;
create table log_companyAgent_PhoneNumber (
action VARCHAR(20),
companyAgentID int,
phoneNumber VARCHAR(40),
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
--***************************************
drop trigger if exists log_delete_companyAgent_PhoneNumber;
DELIMITER $$
CREATE TRIGGER log_delete_companyAgent_PhoneNumber
after DELETE ON companyAgent_PhoneNumber FOR EACH ROW
BEGIN
INSERT INTO log_companyAgent_PhoneNumber VALUES ('DELETE', OLD.companyAgentID, OLD.phoneNumber, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop trigger if exists log_update_companyAgent_PhoneNumber;
DELIMITER $$
CREATE TRIGGER log_update_companyAgent_PhoneNumber
after UPDATE ON companyAgent_PhoneNumber FOR EACH ROW
BEGIN
INSERT INTO log_companyAgent_PhoneNumber VALUES ('UPDATE', NEW.companyAgentID, NEW.phoneNumber, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
drop trigger if exists log_insert_companyAgent_PhoneNumber;
DELIMITER $$
CREATE TRIGGER log_insert_companyAgent_PhoneNumber
after INSERT ON companyAgent_PhoneNumber FOR EACH ROW
BEGIN
INSERT INTO log_companyAgent_PhoneNumber VALUES ('INSERT', NEW.companyAgentID, NEW.phoneNumber, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop table if EXISTS log_companyAgent_Address;
create table log_companyAgent_Address (
action VARCHAR(20),
companyAgentID int,
address VARCHAR(60),
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
drop trigger if exists log_delete_companyAgent_Address;
DELIMITER $$
CREATE TRIGGER log_delete_companyAgent_Address
after DELETE ON companyAgent_Address FOR EACH ROW
BEGIN
INSERT INTO log_companyAgent_Address VALUES ('DELETE', OLD.companyAgentID, OLD.address, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
drop trigger if exists log_update_companyAgent_Address;
DELIMITER $$
CREATE TRIGGER log_update_companyAgent_Address
after UPDATE ON companyAgent_Address FOR EACH ROW
BEGIN
INSERT INTO log_companyAgent_Address VALUES ('UPDATE', NEW.companyAgentID, NEW.address, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
drop trigger if exists log_insert_companyAgent_Address;
DELIMITER $$
CREATE TRIGGER log_insert_companyAgent_Address
after INSERT ON companyAgent_Address FOR EACH ROW
BEGIN
INSERT INTO log_companyAgent_Address VALUES ('INSERT', NEW.companyAgentID, NEW.address, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop table if EXISTS log_checkout_payment;
create table log_checkout_payment (
action VARCHAR(20),
trackingCode varchar(40) PRIMARY KEY ,
companyName varchar(40) NOT NULL,
checkoutRequestDate DATE,
payment_amount VARCHAR(40),
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
drop trigger if exists log_delete_checkout_payment;
DELIMITER $$
CREATE TRIGGER log_delete_checkout_payment
after DELETE ON checkout_payment FOR EACH ROW
BEGIN
INSERT INTO log_checkout_payment VALUES ('DELETE', OLD.trackingCode, OLD.companyName, OLD.checkoutRequestDate, OLD.payment_amount, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
drop trigger if exists log_update_checkout_payment;
DELIMITER $$
CREATE TRIGGER log_update_checkout_payment
after UPDATE ON checkout_payment FOR EACH ROW
BEGIN
INSERT INTO log_checkout_payment VALUES ('UPDATE', NEW.trackingCode, NEW.companyName, NEW.checkoutRequestDate, NEW.payment_amount, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
drop trigger if exists log_insert_checkout_payment;
DELIMITER $$
CREATE TRIGGER log_insert_checkout_payment
after INSERT ON checkout_payment FOR EACH ROW
BEGIN
INSERT INTO log_checkout_payment VALUES ('INSERT', NEW.trackingCode, NEW.companyName, NEW.checkoutRequestDate, NEW.payment_amount, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop table if EXISTS log_flight;
create table log_flight (
action VARCHAR(20),
ID int PRIMARY KEY,
source VARCHAR(40),
destination VARCHAR(40),
departureDateTime TIMESTAMP,
flightDuration_GO INT,
airplaneName VARCHAR(40),
capacity int,
pilotName VARCHAR(40),
cost VARCHAR(40),
status INT,
class VARCHAR(40),
companyName VARCHAR(40),
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
--***************************************
drop trigger if exists log_delete_flight;
DELIMITER $$
CREATE TRIGGER log_delete_flight
after DELETE ON flight FOR EACH ROW
BEGIN
INSERT INTO log_flight VALUES ('DELETE', OLD.ID, OLD.source, OLD.destination, OLD.departureDateTime, OLD.flightDuration_GO, OLD.airplaneName,
OLD.capacity, OLD.pilotName, OLD.cost, OLD.status, OLD.class, OLD.companyName, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop trigger if exists log_update_flight;
DELIMITER $$
CREATE TRIGGER log_update_flight
after UPDATE ON flight FOR EACH ROW
BEGIN
INSERT INTO log_flight VALUES ('UPDATE', NEW.ID, NEW.source, NEW.destination, NEW.departureDateTime, NEW.flightDuration_GO, NEW.airplaneName,
NEW.capacity, NEW.pilotName, NEW.cost, NEW.status, NEW.class, NEW.companyName, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop trigger if exists log_insert_flight;
DELIMITER $$
CREATE TRIGGER log_insert_flight
after INSERT ON flight FOR EACH ROW
BEGIN
INSERT INTO log_flight VALUES ('INSERT', NEW.ID, NEW.source, NEW.destination, NEW.departureDateTime, NEW.flightDuration_GO, NEW.airplaneName,
NEW.capacity, NEW.pilotName, NEW.cost, NEW.status, NEW.class, NEW.companyName, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop table if EXISTS log_flight_2way;
create table log_flight_2way (
action VARCHAR(20),
returnDateTime TIMESTAMP,
flightDuration_RETURN INT,
flightID INT,
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
--***************************************
drop trigger if exists log_delete_flight_2way;
DELIMITER $$
CREATE TRIGGER log_delete_flight_2way
after DELETE ON flight_2way FOR EACH ROW
BEGIN
INSERT INTO log_flight_2way VALUES ('DELETE', OLD.returnDateTime, OLD.flightDuration_RETURN, OLD.flightID, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop trigger if exists log_update_flight_2way;
DELIMITER $$
CREATE TRIGGER log_update_flight_2way
after UPDATE ON flight_2way FOR EACH ROW
BEGIN
INSERT INTO log_flight_2way VALUES ('UPDATE', NEW.returnDateTime, NEW.flightDuration_RETURN, NEW.flightID, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop trigger if exists log_insert_flight_2way;
DELIMITER $$
CREATE TRIGGER log_insert_flight_2way
after INSERT ON flight_2way FOR EACH ROW
BEGIN
INSERT INTO log_flight_2way VALUES ('INSERT', NEW.returnDateTime, NEW.flightDuration_RETURN, NEW.flightID, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop table if EXISTS log_agencySupportAgent;
create table log_agencySupportAgent (
action VARCHAR(20),
ID INT,
firstName VARCHAR(40),
lastName VARCHAR(40),
onlineStatus INT,
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
--***************************************
drop trigger if exists log_delete_agencySupportAgent;
DELIMITER $$
CREATE TRIGGER log_delete_agencySupportAgent
after DELETE ON agencySupportAgent FOR EACH ROW
BEGIN
INSERT INTO log_agencySupportAgent
VALUES ('DELETE', OLD.ID, OLD.firstName, OLD.lastName, OLD.onlineStatus, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop trigger if exists log_update_agencySupportAgent;
DELIMITER $$
CREATE TRIGGER log_update_agencySupportAgent
after UPDATE ON agencySupportAgent FOR EACH ROW
BEGIN
INSERT INTO log_agencySupportAgent VALUES ('UPDATE', NEW.ID, NEW.firstName, NEW.lastName, NEW.onlineStatus, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop trigger if exists log_insert_agencySupportAgent;
DELIMITER $$
CREATE TRIGGER log_insert_agencySupportAgent
after INSERT ON agencySupportAgent FOR EACH ROW
BEGIN
INSERT INTO log_agencySupportAgent VALUES ('INSERT', NEW.ID, NEW.firstName, NEW.lastName, NEW.onlineStatus, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop table if EXISTS log_customer;
create table log_customer (
action VARCHAR(20),
email VARCHAR(40),
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
drop trigger if exists log_delete_customer;
DELIMITER $$
CREATE TRIGGER log_delete_customer
after DELETE ON customer FOR EACH ROW
BEGIN
INSERT INTO log_customer VALUES ('DELETE', OLD.email, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
drop trigger if exists log_update_customer;
DELIMITER $$
CREATE TRIGGER log_update_customer
after UPDATE ON customer FOR EACH ROW
BEGIN
INSERT INTO log_customer VALUES ('UPDATE', NEW.email, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
drop trigger if exists log_insert_customer;
DELIMITER $$
CREATE TRIGGER log_insert_customer
after INSERT ON customer FOR EACH ROW
BEGIN
INSERT INTO log_customer VALUES ('INSERT', NEW.email, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop table if EXISTS log_registered_customer;
create table log_registered_customer (
action VARCHAR(20),
email VARCHAR(40),
username VARCHAR(40) UNIQUE,
password VARCHAR(40),
firstName VARCHAR(40),
lastName VARCHAR(40),
fathersName VARCHAR(40),
birthDate DATE,
mainPhoneNumber VARCHAR (40) NOT NULL,
mainAddress VARCHAR (60) NOT NULL,
birthPlace VARCHAR(40),
socialSecurityNumber VARCHAR(40),
accountNumber VARCHAR(40),
creditAmount INT,
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
drop trigger if exists log_delete_registered_customer;
DELIMITER $$
CREATE TRIGGER log_delete_registered_customer
after DELETE ON registered_customer FOR EACH ROW
BEGIN
INSERT INTO log_registered_customer VALUES ('DELETE', OLD.email, OLD.username, OLD.password, OLD.firstName, OLD.lastName, OLD.fathersName,
OLD.birthDate, OLD.mainPhoneNumber, OLD.mainAddress, OLD.birthPlace, OLD.socialSecurityNumber, OLD.accountNumber, OLD.creditAmount, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
drop trigger if exists log_update_registered_customer;
DELIMITER $$
CREATE TRIGGER log_update_registered_customer
after UPDATE ON registered_customer FOR EACH ROW
BEGIN
INSERT INTO log_registered_customer VALUES ('UPDATE', NEW.email, NEW.username, NEW.password, NEW.firstName, NEW.lastName, NEW.fathersName,
NEW.birthDate, NEW.mainPhoneNumber, NEW.mainAddress, NEW.birthPlace, NEW.socialSecurityNumber, NEW.accountNumber, NEW.creditAmount, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
drop trigger if exists log_insert_registered_customer;
DELIMITER $$
CREATE TRIGGER log_insert_registered_customer
after INSERT ON registered_customer FOR EACH ROW
BEGIN
INSERT INTO log_registered_customer VALUES ('INSERT', NEW.email, NEW.username, NEW.password, NEW.firstName, NEW.lastName, NEW.fathersName,
NEW.birthDate, NEW.mainPhoneNumber, NEW.mainAddress, NEW.birthPlace, NEW.socialSecurityNumber, NEW.accountNumber, NEW.creditAmount, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
-- **********************************************
drop table if EXISTS log_customer_address;
create table log_customer_address (
action VARCHAR(20),
customerID VARCHAR(40),
address VARCHAR (60),
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
drop trigger if exists log_delete_customer_address;
DELIMITER $$
CREATE TRIGGER log_delete_customer_address
after DELETE ON customer_address FOR EACH ROW
BEGIN
INSERT INTO log_customer_address VALUES ('DELETE', OLD.customerID, OLD.address, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
drop trigger if exists log_update_customer_address;
DELIMITER $$
CREATE TRIGGER log_update_customer_address
after UPDATE ON customer_address FOR EACH ROW
BEGIN
INSERT INTO log_customer_address VALUES ('UPDATE', NEW.customerID, NEW.address, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
drop trigger if exists log_insert_customer_address;
DELIMITER $$
CREATE TRIGGER log_insert_customer_address
after INSERT ON customer_address FOR EACH ROW
BEGIN
INSERT INTO log_customer_address VALUES ('INSERT', NEW.customerID, NEW.address, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop table if EXISTS log_customer_phoneNumber;
create table log_customer_phoneNumber (
action VARCHAR(20),
customerID VARCHAR(40),
phoneNumber VARCHAR (40),
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
drop trigger if exists log_delete_customer_phoneNumber;
DELIMITER $$
CREATE TRIGGER log_delete_customer_phoneNumber
after DELETE ON customer_phoneNumber FOR EACH ROW
BEGIN
INSERT INTO log_customer_phoneNumber VALUES ('DELETE', OLD.customerID, OLD.phoneNumber, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
drop trigger if exists log_update_customer_phoneNumber;
DELIMITER $$
CREATE TRIGGER log_update_customer_phoneNumber
after UPDATE ON customer_phoneNumber FOR EACH ROW
BEGIN
INSERT INTO log_customer_phoneNumber VALUES ('UPDATE', NEW.customerID, NEW.phoneNumber, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
drop trigger if exists log_insert_customer_phoneNumber;
DELIMITER $$
CREATE TRIGGER log_insert_customer_phoneNumber
after INSERT ON customer_phoneNumber FOR EACH ROW
BEGIN
INSERT INTO log_customer_phoneNumber VALUES ('INSERT', NEW.customerID, NEW.phoneNumber, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop table if EXISTS log_company_personnel_customer;
create table log_company_personnel_customer (
action VARCHAR(20),
email VARCHAR(40),
companyName VARCHAR(40),
personnelNum VARCHAR(40),
registrationDate DATE,
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
drop trigger if exists log_delete_company_personnel_customer;
DELIMITER $$
CREATE TRIGGER log_delete_company_personnel_customer
after DELETE ON company_personnel_customer FOR EACH ROW
BEGIN
INSERT INTO log_company_personnel_customer VALUES ('DELETE', OLD.email, OLD.companyName, OLD.personnelNum, OLD.registrationDate, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
drop trigger if exists log_update_company_personnel_customer;
DELIMITER $$
CREATE TRIGGER log_update_company_personnel_customer
after UPDATE ON company_personnel_customer FOR EACH ROW
BEGIN
INSERT INTO log_company_personnel_customer VALUES ('UPDATE', NEW.email, NEW.companyName, NEW.personnelNum, NEW.registrationDate, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
drop trigger if exists log_insert_company_personnel_customer;
DELIMITER $$
CREATE TRIGGER log_insert_company_personnel_customer
after INSERT ON company_personnel_customer FOR EACH ROW
BEGIN
INSERT INTO log_company_personnel_customer VALUES ('INSERT', NEW.email, NEW.companyName, NEW.personnelNum, NEW.registrationDate, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop table if EXISTS log_customer_supportAgent;
create table log_customer_supportAgent (
action VARCHAR(20),
customerEmail VARCHAR(40),
supportAgentID int,
title VARCHAR(40),
dateTime TIMESTAMP,
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
drop trigger if exists log_delete_customer_supportAgent;
DELIMITER $$
CREATE TRIGGER log_delete_customer_supportAgent
after DELETE ON customer_supportAgent FOR EACH ROW
BEGIN
INSERT INTO log_customer_supportAgent VALUES ('DELETE', OLD.customerEmail, OLD.supportAgentID, OLD.title, OLD.dateTime, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
drop trigger if exists log_update_customer_supportAgent;
DELIMITER $$
CREATE TRIGGER log_update_customer_supportAgent
after UPDATE ON customer_supportAgent FOR EACH ROW
BEGIN
INSERT INTO log_customer_supportAgent VALUES ('UPDATE', NEW.customerEmail, NEW.supportAgentID, NEW.title, NEW.dateTime, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
drop trigger if exists log_insert_customer_supportAgent;
DELIMITER $$
CREATE TRIGGER log_insert_customer_supportAgent
after INSERT ON customer_supportAgent FOR EACH ROW
BEGIN
INSERT INTO log_customer_supportAgent VALUES ('INSERT', NEW.customerEmail, NEW.supportAgentID, NEW.title, NEW.dateTime, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop table if EXISTS log_customer_flight;
create table log_customer_flight (
action VARCHAR(20),
customerEmail VARCHAR(40),
flightID int,
paymentType VARCHAR(40),
paymentAmount INT,
paymentDate DATE,
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
drop trigger if exists log_delete_customer_flight;
DELIMITER $$
CREATE TRIGGER log_delete_customer_flight
after DELETE ON customer_flight FOR EACH ROW
BEGIN
INSERT INTO log_customer_flight VALUES ('DELETE', OLD.customerEmail, OLD.flightID, OLD.paymentType, OLD.paymentAmount, OLD.paymentDate, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
drop trigger if exists log_update_customer_flight;
DELIMITER $$
CREATE TRIGGER log_update_customer_flight
after UPDATE ON customer_flight FOR EACH ROW
BEGIN
INSERT INTO log_customer_flight VALUES ('UPDATE', NEW.customerEmail, NEW.flightID, NEW.paymentType, NEW.paymentAmount, NEW.paymentDate, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
drop trigger if exists log_insert_customer_flight;
DELIMITER $$
CREATE TRIGGER log_insert_customer_flight
after INSERT ON customer_flight FOR EACH ROW
BEGIN
INSERT INTO log_customer_flight VALUES ('INSERT', NEW.customerEmail, NEW.flightID, NEW.paymentType, NEW.paymentAmount, NEW.paymentDate, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop table if EXISTS log_flight_checkoutPayment;
create table log_flight_checkoutPayment (
action VARCHAR(20),
flightID int,
paymentTrackingCode VARCHAR(40),
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
drop trigger if exists log_delete_flight_checkoutPayment;
DELIMITER $$
CREATE TRIGGER log_delete_flight_checkoutPayment
after DELETE ON flight_checkoutPayment FOR EACH ROW
BEGIN
INSERT INTO log_flight_checkoutPayment VALUES ('DELETE', OLD.flightID, OLD.paymentTrackingCode, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
drop trigger if exists log_update_flight_checkoutPayment;
DELIMITER $$
CREATE TRIGGER log_update_flight_checkoutPayment
after UPDATE ON flight_checkoutPayment FOR EACH ROW
BEGIN
INSERT INTO log_flight_checkoutPayment VALUES ('UPDATE', NEW.flightID, NEW.paymentTrackingCode, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
drop trigger if exists log_insert_flight_checkoutPayment;
DELIMITER $$
CREATE TRIGGER log_insert_flight_checkoutPayment
after INSERT ON flight_checkoutPayment FOR EACH ROW
BEGIN
INSERT INTO log_flight_checkoutPayment VALUES ('INSERT', NEW.flightID, NEW.paymentTrackingCode, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
--***************************************
drop table if EXISTS log_flight_company;
create table log_flight_company (
action VARCHAR(20),
flightID int,
companyName VARCHAR(40),
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
drop trigger if exists log_delete_flight_company;
DELIMITER $$
CREATE TRIGGER log_delete_flight_company
after DELETE ON flight_company FOR EACH ROW
BEGIN
INSERT INTO log_flight_company VALUES ('DELETE', OLD.flightID, OLD.companyName, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
drop trigger if exists log_update_flight_company;
DELIMITER $$
CREATE TRIGGER log_update_flight_company
after UPDATE ON flight_company FOR EACH ROW
BEGIN
INSERT INTO log_flight_company VALUES ('UPDATE', NEW.flightID, NEW.companyName, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ;
drop trigger if exists log_insert_flight_company;
DELIMITER $$
CREATE TRIGGER log_insert_flight_company
after INSERT ON flight_company FOR EACH ROW
BEGIN
INSERT INTO log_flight_company VALUES ('INSERT', NEW.flightID, NEW.companyName, CURRENT_TIMESTAMP);
END;
$$
DELIMITER ; |
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 23-Mar-2016 às 01:23
-- Versão do servidor: 5.6.17
-- PHP Version: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `curso_php`
--
-- --------------------------------------------------------
--
-- Estrutura da tabela `autor`
--
CREATE TABLE IF NOT EXISTS `autor` (
`id_autor` int(11) NOT NULL AUTO_INCREMENT,
`nome_autor` varchar(255) NOT NULL,
PRIMARY KEY (`id_autor`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;
--
-- Extraindo dados da tabela `autor`
--
INSERT INTO `autor` (`id_autor`, `nome_autor`) VALUES
(1, 'Autor 1'),
(2, 'Autor 2'),
(3, 'Autor 3'),
(4, 'Autor 4'),
(5, 'Autor 5');
-- --------------------------------------------------------
--
-- Estrutura da tabela `musicas`
--
CREATE TABLE IF NOT EXISTS `musicas` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`titulo` varchar(40) NOT NULL,
`autor_id` int(45) NOT NULL,
`midia_id` int(45) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=17 ;
--
-- Extraindo dados da tabela `musicas`
--
INSERT INTO `musicas` (`id`, `titulo`, `autor_id`, `midia_id`) VALUES
(7, 'Musica 1', 1, 1),
(8, 'Musica 2', 2, 1),
(9, 'Musica 3', 1, 1),
(10, 'Musica 4', 1, 1),
(11, 'Musica 5', 1, 1),
(12, 'Musica 6', 5, 1),
(13, 'Musica 7', 3, 1),
(14, 'Musica 8', 1, 1),
(15, 'Musica 9', 1, 1),
(16, 'Musica 10', 1, 1);
-- --------------------------------------------------------
--
-- Estrutura da tabela `usuarios`
--
CREATE TABLE IF NOT EXISTS `usuarios` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`email` varchar(80) NOT NULL,
`senha` varchar(80) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
SELECT
count(FREEDOM_FIGHTERS.FREEDOM_FIGHTER_ID),
SECTOR.SECTOR_COMMANDAR,SECTOR.SECTOR_INDEPENDANCE_DATE
FROM FREEDOM_FIGHTERS
JOIN FREEDOM_FIGHTERS_SECTOR ON FREEDOM_FIGHTERS.FREEDOM_FIGHTER_ID =
FREEDOM_FIGHTERS_SECTOR.FREEDOM_FIGHTER_ID
JOIN SECTOR ON FREEDOM_FIGHTERS_SECTOR.SECTOR_NO = SECTOR.SECTOR_NO
WHERE SECTOR_COMMANDAR IN (SELECT
SECTOR_COMMANDAR FROM SECTOR); |
/*
販売単価の合計が仕入単価の合計の1.5倍より大きい商品を求め、商品分類ごとに表示させる
*/
SELECT shohin_bunrui, SUM(hanbai_tanka), SUM(shiire_tanka) FROM Shohin GROUP BY shohin_bunrui HAVING SUM(hanbai_tanka) > SUM(shiire_tanka) * 1.5;
-- ~ごとに表示 = GROUP BY句を使用する
-- グループごとに条件を設定をする場合は、HAVING句を使用する |
-- Faça uma querie que traga todos os posts com sua quantidade de comments.
SELECT text,
COUNT(posts_id) AS Qtd
FROM posts p, comentarios c
WHERE p.id = c.posts_id
GROUP BY text |
SELECT *
FROM beh_reports |
-- 지역 테이블 생성
DROP TABLE locations cascade CONSTRAINTS;
DROP TABLE address cascade CONSTRAINTS;
DROP TABLE departments cascade CONSTRAINTS;
DROP TABLE jobs cascade CONSTRAINTS;
DROP TABLE commissions cascade CONSTRAINTS;
DROP TABLE employees cascade CONSTRAINTS;
DROP TABLE customers cascade CONSTRAINTS;
DROP TABLE credits cascade CONSTRAINTS;
DROP TABLE order_items cascade CONSTRAINTS;
DROP TABLE orders cascade CONSTRAINTS;
DROP TABLE payments cascade CONSTRAINTS;
DROP TABLE product_categories cascade CONSTRAINTS;
DROP TABLE products cascade CONSTRAINTS;
DROP TABLE transport_status cascade CONSTRAINTS;
DROP TABLE product_lines cascade CONSTRAINTS;
DROP TABLE outstock_reasons cascade CONSTRAINTS;
DROP TABLE stocks cascade CONSTRAINTS;
DROP TABLE stock_items cascade CONSTRAINTS;
DROP TABLE storages cascade CONSTRAINTS;
-- 지역 테이블 생성
CREATE TABLE locations (
location_no NUMBER(5) NOT NULL,
location_name VARCHAR2(20) NOT NULL
);
-- 지역 테이블 제약조건 설정(기본키 설정)
ALTER TABLE locations
ADD ( CONSTRAINT locations_locationno_pk PRIMARY KEY(location_no),
CHECK (location_name IN ('NA', 'SA', 'AF', 'AS', 'EU'))
);
-- 주소 테이블 생성
CREATE TABLE address(
address_no NUMBER(5) NOT NULL,
location_no NUMBER(5) NOT NULL,
city VARCHAR2(20) NOT NULL,
post_no VARCHAR2(20),
street_address VARCHAR2(100)
);
-- 주소 테이블 제약조건 설정(기본키 설정)
ALTER TABLE address
ADD ( CONSTRAINT address_addressno_pk PRIMARY KEY (address_no));
-- 부서 테이블 생성
CREATE TABLE departments(
dept_no NUMBER(5) NOT NULL,
address_no NUMBER(5) NOT NULL,
dept_name VARCHAR2(20) NOT NULL
);
-- 부서 테이블 제약조건 설정(기본키 설정)
ALTER TABLE departments
ADD (CONSTRAINT departments_deptno_pk PRIMARY KEY (dept_no));
-- 직무 테이블 생성
CREATE TABLE jobs(
job_no NUMBER(5) NOT NULL,
job_name VARCHAR2(30) NOT NULL
);
-- 직무 테이블 제약조건 설정(기본키 설정)
ALTER TABLE jobs
ADD (CONSTRAINT jobs_jobno_pk PRIMARY KEY (job_no));
-- 커미션 테이블 생성
CREATE TABLE commissions(
commission_no NUMBER(5) NOT NULL,
commission_rate NUMBER(3,3) NOT NULL
);
-- 커미션 테이블 제약조건 설정(기본키 설정)
-- 체크 제약 조건 추가 -> 일정한 퍼미션 비율만 입력 가능
ALTER TABLE commissions
ADD ( CONSTRAINT commissions_commissionno_pk PRIMARY KEY (commission_no),
CHECK (commission_rate IN (0.1, 0.125, 0.15, 0.175, 0.2)));
-- 직원 테이블 생성
CREATE TABLE employees(
employee_no NUMBER(5) NOT NULL,
commission_no NUMBER(5),
job_no NUMBER(5),
employee_position VARCHAR2(30) NOT NULL,
dept_no NUMBER(5),
salary NUMBER(5) NOT NULL,
comments VARCHAR2(80),
employee_id VARCHAR2(30) UNIQUE NOT NULL,
last_name VARCHAR2(30),
hiredate DATE,
first_name VARCHAR2(30),
employee_pw VARCHAR2(30) NOT NULL
);
-- 직원 테이블 제약조건 생성(기본키 설정)
ALTER TABLE employees
ADD ( CONSTRAINT employees_employeeno_pk PRIMARY KEY (employee_no)
);
-- 고객 테이블 생성
CREATE TABLE customers(
customer_no NUMBER(5) NOT NULL,
employee_no NUMBER(5),
address_no NUMBER(5),
credit_no NUMBER(5) NOT NULL,
customer_name VARCHAR2(30) NOT NULL,
customer_phone_no VARCHAR2(80),
customer_comment VARCHAR2(30),
customer_id VARCHAR2(30) UNIQUE NOT NULL,
customer_pw VARCHAR2(30) NOT NULL
);
-- 고객 테이블 제약조건 설정(기본키 설정)
ALTER TABLE customers
ADD ( CONSTRAINT customers_customerno_pk PRIMARY KEY (customer_no)
);
-- 신용등급 테이블 생성
CREATE TABLE credits(
credit_no NUMBER (5) NOT NULL,
credit_name VARCHAR2(30) NOT NULL
);
-- 신용등급 테이블 제약조건 설정(기본키 설정)
ALTER TABLE credits
ADD ( CONSTRAINT credits_creditno_pk PRIMARY KEY (credit_no)
);
-- 주문항목 테이블 생성
CREATE TABLE order_items(
order_item_no NUMBER(5) NOT NULL,
product_no NUMBER(5) NOT NULL,
order_no NUMBER(5) NOT NULL,
product_quantity NUMBER(5)
);
-- 주문항목 테이블 제약조건 설정(기본키 설정)
ALTER TABLE order_items
ADD ( CONSTRAINT order_items_orderitemno_pk PRIMARY KEY (order_item_no)
);
-- 주문 테이블 생성
CREATE TABLE orders(
order_no NUMBER (5) NOT NULL,
customer_no NUMBER (5) NOT NULL,
employee_no NUMBER (5),
shipment_date DATE,
order_money NUMBER (30) NOT NULL,
pay_method VARCHAR2(80),
shipment_status VARCHAR2(30),
order_method VARCHAR2(30),
order_date DATE
);
-- 주문 테이블 제약조건 설정(기본키 설정)
ALTER TABLE orders
ADD ( CONSTRAINT orders_orderno_pk PRIMARY KEY (order_no)
);
-- 결제 테이블 생성
CREATE TABLE payments(
payment_no NUMBER (5) NOT NULL,
transport_status_no NUMBER (5),
order_no NUMBER (5),
payment_date VARCHAR2(30) NOT NULL
);
-- 결제 테이블 제약조건 설정(기본키 설정)
ALTER TABLE payments
ADD ( CONSTRAINT payments_paymentno_pk PRIMARY KEY (payment_no)
);
-- 창고 테이블 생성
CREATE TABLE storages(
storage_no NUMBER(5) NOT NULL,
employee_no NUMBER(5),
address_no NUMBER(5) NOT NULL,
storages_name VARCHAR2(30)
);
-- 창고 테이블 제약사항 설정(기본키 설정)
ALTER TABLE storages
ADD (CONSTRAINT storages_storageno_pk PRIMARY KEY(storage_no));
-- 재고 항목 테이블 생성
CREATE TABLE stock_items(
storage_no NUMBER(5) NOT NULL,
stock_items_no NUMBER(5) NOT NULL
);
-- 재고 테이블 생성
CREATE TABLE stocks(
stock_items_no NUMBER(5) NOT NULL,
product_no NUMBER(5) NOT NULL,
outstock_reason_no NUMBER(5),
employee_no NUMBER(5),
stock_max NUMBER(10) NOT NULL,
stock_quantity NUMBER(10) NOT NULL
);
-- 재고 테이블 제약사항 설정(기본키 설정)
ALTER TABLE stocks
ADD (CONSTRAINT stocks_stockitemsno_pk PRIMARY KEY(stock_items_no));
-- 재고 소진 이유 테이블 생성
CREATE TABLE outstock_reasons(
outstock_reason_no NUMBER(5) NOT NULL,
outstock_reason_name VARCHAR2(30),
reorder_date DATE,
restocked_date DATE
);
-- 재고 소진 이유 제약사항 설정(기본키 설정)
ALTER TABLE outstock_reasons
ADD (CONSTRAINT outstock_reasons_or_pk PRIMARY KEY(outstock_reason_no)
);
-- 생산라인 테이블 생성
CREATE TABLE product_lines(
product_line_no NUMBER(5) NOT NULL,
product_no NUMBER(5),
address_no NUMBER(5) NOT NULL,
employee_no NUMBER(5),
special_status VARCHAR2(15)
);
-- 생산라인 테이블 제약사항 설정(기본키)
ALTER TABLE product_lines
ADD (CONSTRAINT product_lines_productlineno_pk PRIMARY KEY (product_line_no));
-- 운송상태 테이블 생성
CREATE TABLE transport_status(
transport_status_no NUMBER(5) NOT NULL,
payment_no NUMBER(5) NOT NULL,
transport_date DATE ,
transport_start VARCHAR2(30) NOT NULL,
transport_destination VARCHAR2(30) NOT NULL,
current_position VARCHAR2(80)
);
-- 운송상태 테이블 제약사항 설정(기본키 설정
ALTER TABLE transport_status
ADD (CONSTRAINT transport_status_tsno_pk PRIMARY KEY (transport_status_no));
-- 상품 테이블 생성
CREATE TABLE products(
product_no NUMBER(5) NOT NULL,
product_category_no NUMBER(5) NOT NULL,
product_name VARCHAR2(80) NOT NULL,
product_brief_comment VARCHAR2(120),
product_price VARCHAR2(30) NOT NULL,
product_bundle_quantity VARCHAR2(80),
product_detail_comment VARCHAR2(200),
product_picture VARCHAR2(30),
product_release_date DATE
);
-- 상품 테이블 제약사항 설정(기본키 설정)
ALTER TABLE products
ADD (CONSTRAINT products_productno_pk PRIMARY KEY (product_no));
-- 제품군 테이블 생성
CREATE TABLE product_categories(
product_category_no NUMBER(5) NOT NULL,
product_category_name VARCHAR2(30) NOT NULL
);
-- 제품군 테이블 제약사항 설정(기본기 설정)
ALTER TABLE product_categories
ADD (CONSTRAINT product_categories_pcno_pk PRIMARY KEY (product_category_no));
-- 주소 테이블 제약사항 설정(Foreign Key)
ALTER TABLE address
ADD (CONSTRAINT address_locationno_fk FOREIGN KEY (location_no) REFERENCES locations(location_no));
-- 부서 테이블 제약사항 설정(Foreign Key)
ALTER TABLE departments
ADD (CONSTRAINT departments_addressno_fk FOREIGN KEY (address_no) REFERENCES address(address_no));
-- 직원 테이블 제약사항 설정(Foreign Key)
ALTER TABLE employees
ADD (
CONSTRAINT employees_commissionno_fk FOREIGN KEY (commission_no) REFERENCES commissions(commission_no),
CONSTRAINT employees_deptno_fk FOREIGN KEY (dept_no) REFERENCES departments(dept_no),
CONSTRAINT employees_jobno_fk FOREIGN KEY (job_no) REFERENCES jobs(job_no));
-- 고객 테이블 제약사항 설정(Foreign Key)
ALTER TABLE customers
ADD (
CONSTRAINT customers_employeeno_fk FOREIGN KEY (employee_no) REFERENCES employees(employee_no),
CONSTRAINT customers_addressno_fk FOREIGN KEY (address_no) REFERENCES address(address_no),
CONSTRAINT customers_creditno_fk FOREIGN KEY (credit_no) REFERENCES credits(credit_no));
-- 신용등급 테이블 체크 제약사항 설정('EXCELLENT', 'GOOD', 'POOR' 외의 데이터 허용 X)
ALTER TABLE credits
ADD ( CHECK (credit_name IN ('EXCELLENT', 'GOOD', 'POOR')));
-- 주문항목 테이블 제약사항 설정(Foreign Key)
ALTER TABLE order_items
ADD (
CONSTRAINT order_items_productno_fk FOREIGN KEY (product_no) REFERENCES products(product_no),
CONSTRAINT order_items_orderno_fk FOREIGN KEY (order_no) REFERENCES orders(order_no));
-- 주문 테이블 제약사항 설정(Foreign Key)
-- 주문 테이블 체크 제약사항 설정(지불방법, 선적여부)
ALTER TABLE orders
ADD (
CONSTRAINT orders_customerno_fk FOREIGN KEY (customer_no) REFERENCES customers(customer_no),
CONSTRAINT orders_employeeno_fk FOREIGN KEY (employee_no) REFERENCES employees(employee_no),
CHECK (PAY_METHOD IN ('Credit', 'Cash')),
CHECK (shipment_status IN ('Y', 'N')),
CHECK (order_method IN ('우편', '팩스', '전화'))
);
-- 결제 테이블 제약사항 설정(Foreign Key)
ALTER TABLE payments
ADD (
CONSTRAINT payments_customerno_fk FOREIGN KEY (transport_status_no) REFERENCES transport_status(transport_status_no),
CONSTRAINT payments_orderno_fk FOREIGN KEY (order_no) REFERENCES orders(order_no));
-- 창고 테이블 제약사항 설정(Foreign Key)
ALTER TABLE storages
ADD (
CONSTRAINT storages_employeeno_fk FOREIGN KEY(employee_no) REFERENCES employees(employee_no),
CONSTRAINT storages_addressno_fk FOREIGN KEY(address_no) REFERENCES address(address_no));
-- 재고 항목 테이블 제약사항 설정(Foreign Key)
ALTER TABLE stock_items
ADD (CONSTRAINT stock_items_storageno_fk FOREIGN KEY(storage_no) REFERENCES storages(storage_no),
CONSTRAINT stock_items_stockitemsno_fk FOREIGN KEY(stock_items_no) REFERENCES stocks(stock_items_no)
/*CONSTRAINT composite_pk PRIMARY KEY(storage_no, stock_items_no)*/);
-- 재고 테이블 제약사항 설정(Foreign Key)
ALTER TABLE stocks
ADD (
CONSTRAINT stocks_productno_fk FOREIGN KEY(product_no) REFERENCES products(product_no),
CONSTRAINT stocks_outstockreasonno_fk FOREIGN KEY(outstock_reason_no) REFERENCES outstock_reasons(outstock_reason_no),
CONSTRAINT stocks_employeeno_fk FOREIGN KEY(employee_no) REFERENCES employees(employee_no));
-- 생산라인 테이블 제약사항 설정(Foreign Key)
ALTER TABLE product_lines
ADD (
CONSTRAINT product_lines_productno_fk FOREIGN KEY (product_no) REFERENCES products(product_no),
CONSTRAINT product_lines_addressno_fk FOREIGN KEY (address_no) REFERENCES address(address_no),
CONSTRAINT product_lines_employeeno_fk FOREIGN KEY (employee_no) REFERENCES employees(employee_no));
-- 운송상태 테이블 제약사항 설정(Foreign Key)
ALTER TABLE transport_status
ADD (CONSTRAINT transport_status_paymentno_fk FOREIGN KEY (payment_no) REFERENCES payments(payment_no));
-- 상품 테이블 제약사항 설정(Foreign Key)
ALTER TABLE products
ADD (CONSTRAINT products_productcategoryno_fk FOREIGN KEY (product_category_no) REFERENCES product_categories(product_category_no)); |
/*
Navicat MySQL Data Transfer
Source Server : Local PC
Source Server Version : 50617
Source Host : localhost:3306
Source Database : colibri
Target Server Type : MYSQL
Target Server Version : 50617
File Encoding : 65001
Date: 2016-10-06 15:59:14
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for sys_consulta_sql
-- ----------------------------
DROP TABLE IF EXISTS `sys_consulta_sql`;
CREATE TABLE `sys_consulta_sql` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id_usuario` int(11) NOT NULL,
`is_active` tinyint(1) NOT NULL,
`string_query` longtext COLLATE utf8_unicode_ci NOT NULL,
`nombre` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`descripcion` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`id_conexion` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
-- phpMyAdmin SQL Dump
-- version 4.1.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: May 21, 2014 at 03:31 PM
-- Server version: 5.6.16
-- PHP Version: 5.5.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `decont`
--
CREATE DATABASE IF NOT EXISTS `decont` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `decont`;
-- --------------------------------------------------------
--
-- Table structure for table `appdata`
--
CREATE TABLE IF NOT EXISTS `appdata` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`property` text NOT NULL,
`value` text NOT NULL,
`date_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`modified_by` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
--
-- Dumping data for table `appdata`
--
INSERT INTO `appdata` (`id`, `property`, `value`, `date_modified`, `modified_by`) VALUES
(1, 'whiteboard', 'On this whiteboard, usefull links and information may be shared with the other users.', '2014-05-21 16:29:58', 1);
-- --------------------------------------------------------
--
-- Table structure for table `document`
--
CREATE TABLE IF NOT EXISTS `document` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`submited_by` int(11) NOT NULL,
`date_submited` datetime NOT NULL,
`data` longtext NOT NULL,
`title` varchar(65) NOT NULL,
`description` varchar(65) NOT NULL,
`link` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `role`
--
CREATE TABLE IF NOT EXISTS `role` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(65) NOT NULL,
`description` varchar(65) NOT NULL,
`create_user` tinyint(1) NOT NULL,
`delete_user` tinyint(1) NOT NULL,
`edit_user` tinyint(1) NOT NULL,
`create_report` tinyint(1) NOT NULL,
`edit_report` tinyint(1) NOT NULL,
`delete_report` tinyint(1) NOT NULL,
`create_role` tinyint(1) NOT NULL,
`edit_role` tinyint(1) NOT NULL,
`delete_role` tinyint(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
--
-- Dumping data for table `role`
--
INSERT INTO `role` (`id`, `name`, `description`, `create_user`, `delete_user`, `edit_user`, `create_report`, `edit_report`, `delete_report`, `create_role`, `edit_role`, `delete_role`) VALUES
(1, 'admin', 'Full privilegies', 1, 1, 1, 1, 1, 1, 1, 1, 1),
(2, 'guest', 'Read Only', 0, 0, 0, 0, 0, 0, 0, 0, 0);
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE IF NOT EXISTS `user` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`email` varchar(64) NOT NULL,
`password` text NOT NULL,
`salt` text NOT NULL,
`date_created` datetime NOT NULL,
`role` int(10) unsigned NOT NULL,
`first_name` varchar(64) NOT NULL,
`last_name` varchar(64) NOT NULL,
`created_by` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
--
-- Dumping data for table `user`
--
INSERT INTO `user` (`id`, `email`, `password`, `salt`, `date_created`, `role`, `first_name`, `last_name`, `created_by`) VALUES
(1, 'admin@e-uvt.ro', 'a2ed5e9feed1708313362c9762150957830b90a6', 'fb21197446e5adec0d7a3d4bea20863f8218d733', '2014-05-17 21:46:00', 1, 'Admin', '', 1),
(2, 'petrutlucian94@gmail.com', 'b3404cda48cf3ca596c539dfd0e3c36340153a0d', 'b9c7384756cea11800d47ab73c51e98ff4692111', '2014-05-19 00:29:21', 1, 'Lucian', 'Petrut', 1),
(5, 'doe@e-uvt.ro', '0686db426b1945e79c1bdd1a5b583538c7820ce8', '2421ea7c117fae54bbef13e9a982ee2b153cd5e7', '2014-05-19 21:36:33', 2, 'John', 'Doe', 1),
(6, 'test', 'fab6ccf725243aca65aea914bb80b46d20640ef0', 'dcf842c8e7c1386815e5157296619a29cdc72fd7', '2014-05-21 16:14:21', 2, 'test', 'test', 1);
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
CREATE TABLE USERS(
id INT(4) NOT NULL PRIMARY KEY auto_increment,
username VARCHAR(50) NOT NULL,
password VARCHAR(50) NOT null,
enabled boolean NOT NULL
);
INSERT INTO USERS(username,password,enabled) VALUES('qingrong','123456',TRUE);
INSERT INTO USERS(username,password,enabled) VALUES('xiaoqin','123456',TRUE);
INSERT INTO USERS(username,password,enabled) VALUES('lele','123456',FALSE);
select * from users;
drop table users;
create table authorities (
id INT(4) NOT NULL PRIMARY KEY auto_increment,
username varchar(50) not null,
authority varchar(50) not null
);
INSERT INTO authorities(username,authority) VALUES('qingrong','ADMIN');
INSERT INTO authorities(username,authority) VALUES('qingrong','PROVINCE');
INSERT INTO authorities(username,authority) VALUES('xiaoqin','PROVINCE');
INSERT INTO authorities(username,authority) VALUES('lele','PROVINCE');
select * from authorities;
drop table authorities; |
CREATE TABLE [ADM].[C_USUARIO] (
[CL_USUARIO] NVARCHAR (50) NOT NULL,
[NB_USUARIO] NVARCHAR (300) NOT NULL,
[NB_CORREO_ELECTRONICO] NVARCHAR (300) NOT NULL,
[NB_PASSWORD] NVARCHAR (100) NOT NULL,
[FE_CAMBIAR_PASSWORD] DATETIME NULL,
[CL_CAMBIAR_PASSWORD] NVARCHAR (100) NULL,
[FG_CAMBIAR_PASSWORD] BIT NOT NULL,
[XML_PERSONALIZACION] XML NULL,
[ID_ROL] INT NOT NULL,
[ID_EMPLEADO] INT NULL,
[FG_ACTIVO] BIT NOT NULL,
[FE_INACTIVO] DATETIME NULL,
[FE_CREACION] DATETIME NOT NULL,
[FE_MODIFICACION] DATETIME NULL,
[CL_USUARIO_APP_CREA] NVARCHAR (50) NOT NULL,
[CL_USUARIO_APP_MODIFICA] NVARCHAR (50) NULL,
[NB_PROGRAMA_CREA] NVARCHAR (50) NOT NULL,
[NB_PROGRAMA_MODIFICA] NVARCHAR (50) NULL,
CONSTRAINT [PK__C_USUARI__70851B1EF9507A51] PRIMARY KEY CLUSTERED ([CL_USUARIO] ASC),
CONSTRAINT [UC_NB_CORREO_ELECTRONICO] UNIQUE NONCLUSTERED ([NB_CORREO_ELECTRONICO] ASC)
);
|
USE Gringotts
--1
SELECT COUNT(*) AS [Count]
FROM WizzardDeposits
--2
SELECT MAX(MagicWandSize) AS [LongestMagicWand]
FROM WizzardDeposits
--3
SELECT DepositGroup, MAX(MagicWandSize) As [LongestMagicWand]
FROM WizzardDeposits
GROUP BY DepositGroup
--4
SELECT TOP(2) DepositGroup
FROM WizzardDeposits
GROUP BY DepositGroup
ORDER BY AVG(MagicWandSize) ASC
--5
SELECT DepositGroup, SUM(DepositAmount) AS [TotalSum]
FROM WizzardDeposits
GROUP BY DepositGroup
--6
SELECT DepositGroup, SUM(DepositAmount) AS [TotalSum]
FROM WizzardDeposits
WHERE (MagicWandCreator) LIKE 'Ollivander family'
GROUP BY DepositGroup
--7
SELECT DepositGroup, SUM(DepositAmount) AS [TotalSum]
FROM WizzardDeposits
WHERE MagicWandCreator LIKE 'Ollivander family'
GROUP BY DepositGroup
HAVING SUM(DepositAmount) < 150000
ORDER BY TotalSum DESC
--8
SELECT DepositGroup, MagicWandCreator, MIN(DepositCharge) As [MinDepositCharge]
FROM WizzardDeposits
GROUP BY DepositGroup, MagicWandCreator
ORDER BY MagicWandCreator, DepositGroup
--9
SELECT Age, COUNT(*)
FROM WizzardDeposits
GROUP BY Age
|
use abc;
select * from student;
/*
delete from student where rollno=2;
select * from student;
*/
delete from student where rollno > 0;
select * from student;
rollback; |
#使用子查询获得地址为空的所有读者尚未归还的图书清单,要求:按读者编号从高到底、借书日期由近到远的顺序输出读者编号、
#读者姓名、图书名称、借书日期和应归还日期
SELECT a.`rid`,a.`rname`,b.`willdate`,b.`lenddate` FROM reader a INNER JOIN borrow b ON a.`rid`=b.`rid` WHERE raddress IS NULL ORDER BY rid DESC
SELECT YEAR(b.`pdate`),a.`rname`,b.`amount`,c.`bname` FROM reader a INNER JOIN penalty b ON a.`rid`=b.`rid` INNER JOIN book c ON b.`bid`=c.`bid` WHERE pdate > '2018.0.0' ORDER BY pdate DESC
SELECT * FROM book
SELECT * FROM borrow
SELECT * FROM book WHERE bid IN(
SELECT nif FROM borrow WHERE returndate IS NULL
); |
INSERT INTO TraitModifiers (TraitType, ModifierId) VALUES
("TRAIT_CIVILIZATION_DYNASTIC_CYCLE", "my_modifier");
INSERT INTO Modifiers (ModifierId, ModifierType, RunOnce, Permanent, NewOnly, OwnerRequirementSetId, SubjectRequirementSetId) VALUES
("my_modifier", "MODIFIER_ADJUST_OPEN_BORDERS_FROM_INFLUENCE", 0, 0, 0, NULL, NULL);
|
call MMConfig_U_ByInfoInsert (2,2)
/
call MMInfo_Insert (634,16390,'新闻设置','','mainFrame',2,1,2,0,'',0,'',0,'','',0,'','',1)
/
call MMConfig_U_ByInfoInsert (2,5)
/
call MMInfo_Insert (635,20824,'其他设置','','mainFrame',2,1,5,0,'',0,'',0,'','',0,'','',1)
/
|
CREATE TABLE IF NOT EXISTS users (
id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
user_name TEXT NOT NULL UNIQUE,
full_name TEXT NOT NULL,
password TEXT NOT NULL,
user_created_date TIMESTAMP DEFAULT now() NOT NULL,
date_modified TIMESTAMP DEFAULT now() NOT NULL
); |
--Os operadores AND e OR
--São usados para filtrar registros baseados em mais de uma
--condição
--O operador AND mostra um registro se ambas as condições
--forem verdadeiras
--O operador OR mostra um registtro se pelo menos uma das
--condições for verdadeira
--ex:
--SELECT * FROM tbl_Livro
--WHERE ID_Livro > 2 AND ID_Autor < 3
--SELECT * FROM tbl_Livro
--WHERE ID_Livro > 2 OR ID_Autor < 3
|
SELECT avg(total_students) as average_students
FROM (
SELECT count(students) as total_students, cohorts.name as cohort_name
FROM students
JOIN cohorts ON cohorts.id = cohort_id
GROUP BY cohorts.name
) as totals_table;
|
insert into USUARIO(NOME,EMAIL,CPF,SENHA)VALUES('admin','admin','CPFADMIN','21232f297a57a5a743894a0e4a801fc3');
insert into USUARIO(NOME,EMAIL,CPF,SENHA)VALUES('user','user','CPFUSER','ee11cbb19052e40b07aac0ca060c23ee');
insert into PERMISSAO(NOME)VALUES('ROLE_ADMIN');
insert into PERMISSAO(NOME)VALUES('ROLE_USER');
insert into USUARIO_PERMISSAO(USUARIO_ID,PERMISSOES_NOME)VALUES(1,'ROLE_ADMIN');
insert into USUARIO_PERMISSAO(USUARIO_ID,PERMISSOES_NOME)VALUES(1,'ROLE_USER');
|
-- --------------------------------------------------------
-- Host: localhost
-- Server version: 5.7.24 - MySQL Community Server (GPL)
-- Server OS: Win64
-- HeidiSQL Version: 10.2.0.5599
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- Dumping database structure for survey
CREATE DATABASE IF NOT EXISTS `survey` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `survey`;
-- Dumping structure for table survey.biodata_mahasiswa
CREATE TABLE IF NOT EXISTS `biodata_mahasiswa` (
`user_id` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
`name` varchar(25) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`prodi` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`gender` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
`angkatan` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`phone` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
`ipk` float NOT NULL,
`domisili` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`activity` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- Data exporting was unselected.
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
{%- macro income_cents(column_parameter, round_parameter = 2) -%}
round( 1.0 * {{column_parameter}} / 10, {{round_parameter}})
{%- endmacro -%} |
--ALTER SESSION SET NLS_NUMERIC_CHARACTERS = '. ';
DECLARE
v_str VARCHAR2(30) := lower(:duration);
isCorrectRow INTEGER := 0;
v_week FLOAT;
v_day FLOAT;
v_hour FLOAT;
v_min FLOAT;
pos_w INTEGER;
pos_d INTEGER;
pos_h INTEGER;
pos_m INTEGER;
interval_DS INTEGER;
BEGIN
BEGIN
-- 1 - is Correct format
SELECT NVL2(v_str,decode(ltrim(translate(v_str, 'wdhm0123456789.', ' ')), NULL, 1, 0), 0) INTO isCorrectRow
FROM dual;
IF (isCorrectRow > 0) THEN
SELECT instr(v_str, 'w') INTO pos_w FROM dual;
IF (pos_w > 0) THEN
SELECT to_number(substr(v_str, 1, pos_w-1)) INTO v_week FROM dual;
v_str := ltrim(substr(v_str, pos_w+1));
END IF;
SELECT instr(v_str, 'd') INTO pos_d FROM dual;
IF (pos_d > 0) THEN
SELECT to_number(substr(v_str, 1, pos_d-1)) INTO v_day FROM dual;
v_str := ltrim(substr(v_str, pos_d+1));
END IF;
SELECT instr(v_str, 'h') INTO pos_h FROM dual;
IF (pos_h > 0) THEN
SELECT to_number(substr(v_str, 1, pos_h-1)) INTO v_hour FROM dual;
v_str := ltrim(substr(v_str, pos_h+1));
END IF;
SELECT instr(v_str, 'm') INTO pos_m FROM dual;
IF (pos_m > 0) THEN
SELECT to_number(substr(v_str, 1, pos_m-1)) INTO v_min FROM dual;
END IF;
interval_DS := NVL(v_week*5*24*60*60, 0) + NVL(v_day*24*60*60, 0) + NVL(v_hour*60*60, 0) + NVL(v_min*60, 0);
ELSE interval_DS := NULL;
END IF;
--dbms_output.put_line(to_char(interval_DS));
EXCEPTION
WHEN OTHERS THEN interval_DS := NULL;
END;
RETURN interval_DS;
END; |
create table FLW_RU_BATCH (
ID_ NVARCHAR2(64) not null,
REV_ INTEGER,
TYPE_ NVARCHAR2(64) not null,
SEARCH_KEY_ NVARCHAR2(255),
SEARCH_KEY2_ NVARCHAR2(255),
CREATE_TIME_ TIMESTAMP(6) not null,
COMPLETE_TIME_ TIMESTAMP(6),
STATUS_ NVARCHAR2(255),
BATCH_DOC_ID_ NVARCHAR2(64),
TENANT_ID_ NVARCHAR2(255) default '',
primary key (ID_)
);
create table FLW_RU_BATCH_PART (
ID_ NVARCHAR2(64) not null,
REV_ INTEGER,
BATCH_ID_ NVARCHAR2(64),
TYPE_ NVARCHAR2(64) not null,
SCOPE_ID_ NVARCHAR2(64),
SUB_SCOPE_ID_ NVARCHAR2(64),
SCOPE_TYPE_ NVARCHAR2(64),
SEARCH_KEY_ NVARCHAR2(255),
SEARCH_KEY2_ NVARCHAR2(255),
CREATE_TIME_ TIMESTAMP(6) not null,
COMPLETE_TIME_ TIMESTAMP(6),
STATUS_ NVARCHAR2(255),
RESULT_DOC_ID_ NVARCHAR2(64),
TENANT_ID_ NVARCHAR2(255) default '',
primary key (ID_)
);
create index FLW_IDX_BATCH_PART on FLW_RU_BATCH_PART(BATCH_ID_);
alter table FLW_RU_BATCH_PART
add constraint FLW_FK_BATCH_PART_PARENT
foreign key (BATCH_ID_)
references FLW_RU_BATCH (ID_);
insert into ACT_GE_PROPERTY values ('batch.schema.version', '6.8.1.0', 1);
|
drop table userinfo cascade constraints;
create table userinfo
(email varchar(100),
password varchar(100),
accounttype varchar(20),
privacy varchar(10),
regtime varchar(10),
names varchar(100),
gradyear varchar(5),
constraint pk_user primary key (email));
|
DROP TABLE IF EXISTS exams CASCADE;
|
-- cria um banco de dados
create database db_servico_rh;
-- acessa o banco de dados
use db_servico_rh;
-- cria uma tabela
create table tb_funcionarios(
id bigint auto_increment,
nome varchar(255) not null, -- not null obrigatorio preencher a coluna
idade int not null,
salario float not null,
primary key(id)
);
-- busca das informações
select * from tb_funcionarios;
-- busca das informações especificas
select nome, salario from tb_funcionarios where salario = 20000;
-- aqui insert dados da tabela
insert into tb_funcionarios (nome,idade,salario) values ("Rafael", 00,10000);
insert into tb_funcionarios (nome,idade,salario) values ("Maraia", 20,10000);
-- altera a tabela add coluna
alter table tb_funcionarios
add descricao varchar(255);
-- modifica coluna no BD
alter table tb_funcionarios change descricao descricao_funcionario varchar (255);
-- atualiza um dado da tabela
update tb_funcionarios set salario = 20000 where id = 1;
-- deleta um dado
delete from tb_funcionarios where id = 3; |
### seeds.sql
USE burgers_db;
INSERT INTO burgers (burger_name) VALUES
("California cheeseburger"),
("Double cheeseburger"),
("Bacon cheeseburger"),
("Quarter pound hamburger");
INSERT INTO burgers (burger_name, devoured) VALUES
("Chicken burger", false),
("Turkey burger", false); |
update ACT_GE_PROPERTY set VALUE_ = '6.5.0.5' where NAME_ = 'entitylink.schema.version';
|
CREATE TABLE users (
id SERIAL PRIMARY KEY,
email VARCHAR NOT NULL,
password VARCHAR NOT NULL
);
CREATE TABLE books (
id SERIAL PRIMARY KEY,
isbn INTEGER NOT NULL,
title VARCHAR NOT NULL,
author INTEGER NOT NULL,
year INTEGER NOT NULL
);
CREATE TABLE reviews(
id SERIAL PRIMARY KEY,
books_id INTEGER,
rating INTEGER NOT NULL,
review VARCHAR(250) NOT NULL,
FOREIGN KEY (books_id) REFERENCES books (id)
);
CREATE TABLE user_reviews(
user_id INTEGER,
review_id INTEGER,
FOREIGN KEY(user_id) REFERENCES users (id),
FOREIGN KEY(review_id) REFERENCES reviews(id)
);
|
UPDATE participant SET gender = 'MALE' WHERE gender = 'M';
UPDATE participant SET gender = 'FEMALE' WHERE gender = 'F';
UPDATE participant SET gender = 'UNKNOWN' WHERE gender <> 'F' AND gender <> 'M'; |
delete from HtmlLabelIndex where id=24413
/
delete from HtmlLabelInfo where indexid=24413
/
INSERT INTO HtmlLabelIndex values(24413,'继续添加会影响页面性能!还要继续吗?')
/
INSERT INTO HtmlLabelInfo VALUES(24413,'继续添加会影响页面性能!还要继续吗?',7)
/
INSERT INTO HtmlLabelInfo VALUES(24413,'Continue adding will affect the performance of the page!Continue?',8)
/
INSERT INTO HtmlLabelInfo VALUES(24413,'繼續添加會影響頁面性能!還要繼續嗎?',9)
/
|
insert into product (name, description, icon, color, price) values
('Phone', 'Mobile device', 'mobile-alt', '#FF6766', 495.99),
('Laptop', 'For work and leisure', 'laptop', '#97CE68', 1499.95),
('Headphones', 'Quiet comfort', 'headphones', '#4BA6E0', 249.95),
('Concert', '2x concert tickets', 'music', '#ffb366', 79.90),
('Bicycle', 'Two wheels, one saddle', 'bicycle', 'green', 889.95),
('Cinema', '2x movie tickets', 'film', 'dimgray', 20.00),
('Gamepad', 'For fun', 'gamepad', '#FF6766', 19.95);
insert into user(first_name, last_name, password, username) values
('Mary', 'Jane', 'mary', 'jane'),
('Joe', 'Doe', 'joe', 'doe');
insert into address(street, zip_code, city) values
('Bourbon St 3', '12345', 'Seville'),
('Evergreen Terrace 667', '13813', 'Metropolis');
|
SELECT
tp.ProductName AS `Produto`,
tp.Price AS `Preço`
FROM w3schools.products AS tp
INNER JOIN w3schools.order_details AS tod
ON tod.ProductID = tp.ProductID
WHERE tod.Quantity > 80
ORDER BY 1;
|
SELECT 'ФИО: Рябышев Евгений' as Studen ;
--Оконные функции.
--Вывести список пользователей в формате userId, movieId, normed_rating, avg_rating где
--userId, movieId - без изменения
--для каждого пользователя преобразовать рейтинг r в нормированный - normed_rating=(r - r_min)/(r_max - r_min), где r_min и r_max соответственно минимально и максимальное значение рейтинга у данного пользователя
--avg_rating - среднее значение рейтинга у данного пользователя
--Вывести первые 30 таких записей
select userId, movieId,
avg(rating) OVER (PARTITION BY userid ORDER BY movieid) as avg_rating,
rating - MIN(rating) over(ORDER BY rating) /
(MAX(rating) over(PARTITION BY userid) -
MIN(rating) over(PARTITION BY userid)) as normed_rating
from ratings
limit 30;
--ETL
--создания таблички keywords
create table keywords
(
id serial,
tags varchar(255)
)
|
CREATE TABLE [endur].[vw_gas_phys_param]
(
INS_NUM INT NULL,
PARAM_SEQ_NUM INT NULL,
CHILD_GROUP_ID INT NULL,
SCHEDULE_PARTY INT NULL,
FUEL_CALC_METHOD INT NULL,
FUEL_PERCENT FLOAT NULL,
OMIT_WAVG INT NULL,
LOCATION_ID INT NULL,
BUYBACK INT NULL,
MIN_QTY FLOAT NULL,
MAX_QTY FLOAT NULL,
VOLUME_TYPE INT NULL,
TLINK_GROUP_NUM INT NULL,
TLINK_ALLOC_TYPE INT NULL,
TLINK_PERCENT_ALLOC FLOAT NULL,
TLINK_DEAL_NUM INT NULL,
RATE_SCHEDULE_ID INT NULL,
CRITERIA_ID INT NULL,
BAV_CUTOFF_DATE DATE NULL,
TIME_ZONE INT NULL,
START_TIME DATE NULL,
END_TIME DATE NULL,
VOLUME_PRECISION INT NULL,
MEASURE_GROUP_ID INT NULL,
OFFSET_LOCATION_ID INT NULL,
DAY_START_TIME INT NULL,
INVENTORY_LOSS_PERCENT FLOAT NULL,
INVENTORY_LOSS_CALC_TYPE INT NULL,
PRODUCT_ID INT NULL,
MODIFIED_PRODUCT INT NULL,
LOAD_SHAPE INT NULL,
DEAL_START_TIME INT NULL,
DEAL_END_TIME INT NULL,
IS_SCHEDULED INT NULL,
TRANSPORT_CLASS INT NULL,
PATH_LOCATION_ID INT NULL,
TLINK_DEST_DEAL_NUM INT NULL,
SHIPPER_CODE INT NULL,
IS_BALANCE INT NULL,
TANK_ID INT NULL,
TLINK_TRANSIT_TIME DATE NULL,
USER_PATH_ID INT NULL,
COMMITMENT_ID INT NULL,
INT_TRADING_STRATEGY INT NULL,
EXT_TRADING_STRATEGY INT NULL,
FACILITY_ID INT NULL,
PRICING_VOLUME_TYPE INT NULL,
SETTLEMENT_CONV FLOAT NULL,
SETTLEMENT_CONV_UNIT INT NULL,
LOC_SERVICE_TYPE INT NULL,
IS_ADJUSTMENT INT NULL,
INTENT_START_OFFSET NVARCHAR(MAX) NULL,
INTENT_END_OFFSET NVARCHAR(MAX) NULL,
LIFTINGS_PER_PERIOD INT NULL,
COMM_WINDOW_LENGTH INT NULL,
COMM_WINDOW_OFFSET INT NULL,
FACILITY_GROUP_ID INT NULL,
TEMPLATE_IDX_GROUP INT NULL,
TEMPLATE_IDX_SUBGROUP INT NULL,
TEMPLATE_PIPELINE_ID INT NULL,
TEMPLATE_ZONE_ID INT NULL,
TEMPLATE_PENDING_LOC_ID INT NULL,
TEMPLATE_GEO_LOC_ID INT NULL,
TITLE_XFER_EVENT INT NULL,
TITLE_XFER_OFFSET NVARCHAR(MAX) NULL,
FINANCIAL_SECURITY_TYPE INT NULL,
FINANCIAL_SECURITY_EVENT INT NULL,
FINANCIAL_SECURITY_OFFSET NVARCHAR(MAX) NULL
)
|
create table author
(
id int auto_increment
primary key,
first_name varchar(50) not null,
last_name varchar(50) not null
);
create table categorie
(
id int auto_increment
primary key,
label varchar(25) not null
);
create table book
(
id int not null
primary key,
title varchar(100) not null,
pub_date date null,
page int not null,
synopsis text not null,
cover varchar(200) not null,
author_id int not null,
categorie_id int not null,
constraint author_book_fk
foreign key (author_id) references author (id),
constraint categorie_book_fk
foreign key (categorie_id) references categorie (id)
);
create table customer
(
id int auto_increment
primary key,
first_name varchar(50) not null,
last_name varchar(50) not null,
adress varchar(100) not null,
postal_code varchar(6) not null,
city varchar(50) not null,
email varchar(100) not null,
password varchar(200) not null
);
create table library
(
id int auto_increment
primary key,
nom varchar(100) not null,
adress varchar(100) not null,
phone_num varchar(20) not null,
email varchar(100) not null
);
create table copy
(
id int auto_increment
primary key,
format varchar(40) not null,
book_id int not null,
library_id int not null,
status varchar(40) not null,
constraint book_copy_fk
foreign key (book_id) references book (id),
constraint library_copy_fk
foreign key (library_id) references library (id)
);
create table emprunt
(
id int auto_increment
primary key,
emprunt_date date not null,
return_date date not null,
is_extended tinyint(1) default 0 not null,
customer_id int not null,
copy_id int not null,
constraint copy_emprunt_fk
foreign key (copy_id) references copy (id),
constraint customer_emprunt_fk
foreign key (customer_id) references customer (id)
);
create table waiting_list
(
id int auto_increment
primary key,
customer_id int not null,
date_request datetime(6) null,
date_sending_mail datetime null,
book_id int not null,
date_recovery_limit datetime null,
constraint book_waiting_list_fk
foreign key (book_id) references book (id),
constraint customer_waitingList_fk
foreign key (customer_id) references customer (id)
);
|
-- phpMyAdmin SQL Dump
-- version 4.4.15.5
-- http://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Generation Time: 2017-01-08 05:15:56
-- 服务器版本: 5.5.49-log
-- PHP Version: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `baidunews`
--
-- --------------------------------------------------------
--
-- 表的结构 `news`
--
CREATE TABLE IF NOT EXISTS `news` (
`id` int(11) NOT NULL,
`newstype` char(200) NOT NULL,
`newstitle` varchar(200) NOT NULL,
`newsimg` varchar(200) NOT NULL,
`newstime` datetime NOT NULL,
`newssrc` char(200) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8;
--
-- 转存表中的数据 `news`
--
INSERT INTO `news` (`id`, `newstype`, `newstitle`, `newsimg`, `newstime`, `newssrc`) VALUES
(1, '推荐', '测试数据库中的第一条数据', 'image/a.jpg', '2016-12-28 00:00:00', '网易头条'),
(2, '推荐', '推手万吉:退出与阿里的红包大战!微信发布小程序,企业家自明星该如何抓住这波红利?', 'image/bb.png', '2016-12-29 00:00:00', '百度推荐'),
(3, '推荐', '稻香村炸串儿今起限购十串 速冻装半天就卖空', 'image/20.jpeg', '2016-12-29 00:00:00', '百度推荐'),
(4, '推荐', '城中村孩子的生活 废墟中寻乐', 'image/22.jpg', '2016-12-29 00:00:00', '网易头条'),
(5, '推荐', ' 《西游伏妖篇》悟空现原形 吴亦凡“暴打”林更新', 'image/23.jpeg', '2016-12-29 00:00:00', '吴亦凡'),
(6, '社会', '女子分手被捅8刀 曾被威胁如果分手就杀了全家人', 'image/24.jpeg', '2016-12-29 00:00:00', '社会'),
(7, '推荐', '小程序对公众号运营者意味着什么?这是新榜的分析', 'image/25.jpeg', '2016-12-29 00:00:00', '推荐'),
(8, '推荐', '俄罗斯女主持不听警告偷摸熊 棕熊转身将她打趴', 'image/26.jpeg', '2016-12-29 00:00:00', '凤凰要闻'),
(9, '推荐', '阿里大文娱未来三年的投入规划超过500亿:我们不是来玩的', 'image/30.jpeg', '2016-12-29 00:00:00', '凤凰要闻'),
(10, '推荐', '辽宁舰已抵三亚 美:对远训无异议 符合航行自由', 'image/27.jpeg', '2016-12-29 00:00:00', '凤凰头条'),
(11, '推荐', '关于2017年的VR,我们能做出哪些判断?', 'image/31.jpeg', '2016-12-29 00:00:00', '猜你喜欢'),
(12, '娱乐', ' 冬季最流行的半丸子头风靡亚洲 这样扎才不怕撞造型', 'image/nr.png', '2016-12-29 00:00:00', '猜你喜欢'),
(13, '娱乐', '“第三人生”:万达的新场景实验', 'image/32.jpeg', '2016-12-29 00:00:00', '百度原创'),
(14, '推荐', '习近平这三副锦囊 为深化改革点出关键', 'image/d.jpg', '2016-12-29 00:00:00', '热点'),
(19, '百家', '大蟒蛇吞下了狗还没来得及消化,结果被活活卡死在了栏杆上', 'image/001.jpeg', '2016-12-29 00:00:00', '百度新闻'),
(20, '百家', '一年缔造8个超级大号 他何以成为百家号作者心中“神一样的存在”', 'image/002.jpeg', '2016-12-22 00:00:00', '百度新闻'),
(21, '本地', '北京一女生被球踢到家长讨说法 校长当场宣布开除', 'image/003.jpeg', '2016-12-29 00:00:00', '本地'),
(23, '推荐', '五富豪去年身家缩水百亿 贾跃亭持股市值猛减156亿元', 'image/11.png', '2017-01-05 00:00:00', '网易要闻'),
(24, '百家', '我国4G用户总数逾7亿户 将推动形成全球统一5G标准', 'image/12.png', '2017-01-06 00:00:00', '网易头条'),
(25, '百家', '全民关注消防安全 消防企业走进北上广深高铁站', 'image/33.jpeg', '2017-01-03 00:00:00', '网易要闻'),
(26, '百家', '徐若瑄大陆捞金遭抵制 现疯狂洗白', 'image/34.jpeg', '2017-01-06 00:00:00', '百度头条');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `news`
--
ALTER TABLE `news`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `news`
--
ALTER TABLE `news`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=40;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
-- To assign SELECT only access, use this example:
-- GRANT SELECT ON "DB2INST1"."VIEW_CANVAS_STUDENT_USERS" TO USER DASHBOARD
CREATE OR REPLACE VIEW DB2INST1.VIEW_CANVAS_STUDENT_USERS (
user_id,
integration_id,
login_id,
password,
first_name,
last_name,
sortable_name,
short_name,
email,
status
) AS
WITH active_students AS (
SELECT student_id, student_status_id
FROM TABLE(edumate.getAllStudentStatus(current date))
WHERE
student_status_id IN (5,2)
AND
end_date >= DATE('2015-05-01')
)
SELECT * FROM (
SELECT
contact.contact_id || '.' || student.student_number || '.' || student.student_id AS "user_id",
student.student_id AS "integration_id",
(CASE WHEN sys_user.username IS null THEN LEFT(contact.email_address, LENGTH(contact.email_address) - 25) ELSE sys_user.username END) AS "login_id",
null AS "password",
REPLACE(COALESCE(contact.preferred_name, contact.firstname), ''', '''') AS "first_name",
REPLACE(contact.surname, ''', '''') AS "last_name",
REPLACE(contact.surname, ''', '''') || ', ' || REPLACE(COALESCE(contact.preferred_name, contact.firstname), ''', '''') AS "sortable_name",
REPLACE(COALESCE(contact.preferred_name, contact.firstname), ''', '''') || ' ' || REPLACE(contact.surname, ''', '''') AS "short_name",
contact.email_address AS "email",
'active' AS "status"
FROM active_students
INNER JOIN student ON student.student_id = active_students.student_id
INNER JOIN contact ON contact.contact_id = student.contact_id
LEFT JOIN sys_user ON sys_user.contact_id = student.contact_id
ORDER BY active_students.student_status_id DESC, UPPER(contact.surname), UPPER(contact.preferred_name), UPPER(contact.firstname)
) |
DB.DBA.VHOST_REMOVE (
lhost=>'*ini*',
vhost=>'*ini*',
lpath=>'/place'
);
DB.DBA.VHOST_DEFINE (
lhost=>'*ini*',
vhost=>'*ini*',
lpath=>'/place',
ppath=>'/DAV/',
is_dav=>1,
is_brws=>0,
def_page=>'',
vsp_user=>'dba',
ses_vars=>0,
opts=>vector ('browse_sheet', '', 'cors', '*', 'cors_restricted', 0, 'url_rewrite', 'http_rule_list_17'),
is_default_host=>0);
DB.DBA.URLREWRITE_CREATE_RULELIST (
'http_rule_list_17',
1,
vector ('http_rule_17'));
DB.DBA.URLREWRITE_CREATE_REGEX_RULE (
'http_rule_17',
1,
'/place/(.*)',
vector ('par_17'),
1,
'/fct/rdfdesc/description.vsp?g=http://data.doremus.org/place/%U',
vector ('par_17'),
NULL,
NULL,
2,
0,
'');
|
CREATE DATABASE testefc;
USE testefc;
CREATE TABLE familia(id INT(6) AUTO_INCREMENT,nome VARCHAR(20) NOT NULL,quantidade_membros INT(4),PRIMARY KEY(id));
CREATE TABLE guerra(id INT(6) AUTO_INCREMENT,nome VARCHAR(20) NOT NULL,inicio DATE NOT NULL,fim DATE,PRIMARY KEY(id));
CREATE TABLE participa(id INT(6) AUTO_INCREMENT,disputa INT(6) NOT NULL,desafiadora INT(6) NOT NULL,desafiada INT(6) NOT NULL,vencedora INT(6),FOREIGN KEY desafiadora REFERENCES familia(id),FOREIGN KEY desafiada REFERENCES familia(id),FOREIGN KEY vencedora REFERENCES familia(id),FOREIGN KEY disputa REFERENCES guerra(id),PRIMARY KEY(id));
INSERT INTO familia(nome,quantidade_membros) VALUES('Adans',5);
INSERT INTO familia(nome,quantidade_membros) VALUES('abc',3);
INSERT INTO familia(nome,quantidade_membros) VALUES('Dorremi',7);
INSERT INTO guerra(nome,inicio,fim) VALUES('duas rosas','1900-04-02','1902-04-02');
INSERT INTO guerra(nome,inicio,fim) VALUES('pao de queijo','1998-05-12','2001-04-02');
INSERT INTO guerra(nome,inicio,fim) VALUES('batata','2009-12-02','2012-04-02');
INSERT INTO participa(disputa,desafiadora,desafiada,vencedora) VALUES(1,1,2,1);
INSERT INTO participa(disputa,desafiadora,desafiada,vencedora) VALUES(2,2,3,1);
INSERT INTO participa(disputa,desafiadora,desafiada,vencedora) VALUES(3,3,1,3); |
CREATE TABLE `changelog` (
`id` decimal(20,0) DEFAULT NULL,
`applied_at` varchar(25) DEFAULT NULL,
`description` varchar(255) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
create table Spitter (
id identity,
username varchar(20) unique not null,
password varchar(20) not null,
first_name varchar(30) not null,
last_name varchar(30) not null,
email varchar(30) not null
);
create table spittle (
id integer identity primary key,
spitter integer not null,
message varchar(2000) not null,
postedTime datetime not null,
foreign key (spitter) references spitter(id)
); |
create procedure hiplordC2
as
select '2003' as year, 2.1 as good, 1.5 as late
union all
select '2004' as year, 2.2 as good, 2.5 as late
union all
select '2005' as year, 2.3 as good, 3.5 as late
union all
select '2006' as year, 2.4 as good, 4.5 as late
union all
select '2007' as year, 2.5 as good, 5.5 as late
union all
select '2008' as year, 2.6 as good, 6.5 as late
|
ALTER TABLE "public"."users" ADD COLUMN "emails" jsonb NOT NULL; |
CREATE TABLE client(
client_uuid uuid DEFAULT uuid_generate_v4(),
client_email VARCHAR(25) NOT NULL,
hashed_password VARCHAR(250) NOT NULL,
client_photo_profile VARCHAR NOT NULL,
is_active BOOLEAN DEFAULT TRUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (client_uuid)
); |
USE hutoma;
DROP PROCEDURE `getAIsForEntity`;
DELIMITER ;;
CREATE DEFINER=`intentUser`@`127.0.0.1` PROCEDURE `getAIsForEntity`(
IN `param_devid` VARCHAR(50),
IN `param_entity_name` VARCHAR(50)
) READS SQL DATA
BEGIN
SELECT DISTINCT `ai`.`aiid`
FROM `intent` i INNER JOIN `ai` on i.`aiid` = `ai`.`aiid`
WHERE JSON_CONTAINS(JSON_EXTRACT(`intent_json`, "$.variables[*].entity_name"), JSON_ARRAY(param_entity_name))
AND `ai`.`dev_id`= param_devid;
END;;
DELIMITER ;
|
DROP TABLE IF EXISTS `link`;
CREATE TABLE `link` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`image` varchar(255) NOT NULL DEFAULT '',
`image_id` bigint(20) unsigned NOT NULL DEFAULT '0',
`url` varchar(255) NOT NULL DEFAULT '',
`tag` varchar(20) NOT NULL,
`sort` smallint(3) NOT NULL DEFAULT '0',
`time` int(11) NOT NULL DEFAULT '0',
`status` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
INSERT INTO `link` (`id`, `title`, `image`,`image_id`, `url`, `tag`, `sort`, `time`, `status`) VALUES(1,'小林子','',0,'https://xlzi.cn','link',1,2147483647,1),(2,'傻瓜','',0,'http://shagua.name','link',2,1544092212,1),(3,'幸福彼岸','',0,'http://zee.kim','link',0,1555002780,1);
DROP TABLE IF EXISTS `post`;
CREATE TABLE `post` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
`content` text CHARACTER SET utf8 NOT NULL,
`keywords` varchar(100) NOT NULL,
`description` varchar(1000) NOT NULL,
`author` varchar(50) CHARACTER SET utf8 NOT NULL,
`cover` varchar(100) CHARACTER SET utf8 NOT NULL DEFAULT '',
`cover_id` bigint(20) unsigned NOT NULL DEFAULT '0',
`view` int(4) unsigned NOT NULL DEFAULT '0',
`time` int(10) unsigned NOT NULL DEFAULT '0',
`update_time` int(10) unsigned NOT NULL DEFAULT '0',
`best` tinyint(1) unsigned NOT NULL DEFAULT '0',
`status` tinyint(1) unsigned NOT NULL DEFAULT '0',
`tag_id` bigint(20) unsigned NOT NULL DEFAULT '0',
`tag_name` varchar(20) CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `tag`;
CREATE TABLE `tag` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(20) CHARACTER SET utf8 NOT NULL DEFAULT '',
`count` int(4) unsigned NOT NULL DEFAULT '0',
`tag` varchar(20) NOT NULL,
`sort` int(11) NOT NULL DEFAULT '0',
`status` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
INSERT INTO `tag` (`id`, `name`, `count`, `tag`, `sort`, `status`) VALUES(1,'笔记',0,'',0,1),(2,'其他',0,'',1,1);
DROP TABLE IF EXISTS `upload`;
CREATE TABLE `upload` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`path` varchar(100) CHARACTER SET utf8 NOT NULL DEFAULT '',
`name` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '',
`type` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '',
`size` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '',
`time` int(10) unsigned NOT NULL DEFAULT '0',
`bind_id` bigint(20) NOT NULL DEFAULT '0',
`bind_type` varchar(10) CHARACTER SET utf8 NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
CREATE TABLE `user` (
`id` smallint(3) unsigned NOT NULL AUTO_INCREMENT,
`account` varchar(20) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '自定义账号',
`password` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '密码',
`level` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '0普通会员 255 超级管理',
`nickname` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '昵称',
`photo` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
`email` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '邮箱',
`email_verification` tinyint(1) NOT NULL DEFAULT '0',
`tel` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '手机',
`tel_verification` tinyint(1) NOT NULL DEFAULT '0',
`join_ip` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '',
`join_time` int(10) unsigned NOT NULL DEFAULT '0',
`login_ip` varchar(50) CHARACTER SET utf8 NOT NULL,
`login_time` int(10) unsigned NOT NULL DEFAULT '0',
`status` tinyint(1) unsigned NOT NULL DEFAULT '0',
`token` varchar(100) CHARACTER SET utf8 NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `user_verification`;
CREATE TABLE `user_verification` (
`type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:EMAIL,1:TEL',
`code` varchar(100) NOT NULL DEFAULT '' COMMENT 'email认证码或者短信验证码',
`time` int(10) NOT NULL DEFAULT '0',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否验证',
`user_id` bigint(20) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
/*query multads*/
DROP TABLE IF EXISTS pessoa;
DROP TABLE IF EXISTS perfilpermissao;
DROP TABLE IF EXISTS permissao;
DROP TABLE IF EXISTS usuario;
DROP TABLE IF EXISTS perfil;
DROP TABLE IF EXISTS pagamento;
DROP TABLE IF EXISTS multa;
DROP TABLE IF EXISTS infracao;
DROP TABLE IF EXISTS tipoinfracao;
DROP TABLE IF EXISTS pontuacaoveiculo;
CREATE TABLE usuario (
id SERIAL PRIMARY KEY,
login VARCHAR(150),
tipoperfil SERIAL,
senha VARCHAR(150),
UNIQUE(login)
);
CREATE TABLE perfilpermissao (
id SERIAL PRIMARY KEY,
idpermissao SERIAL,
idperfil SERIAL
);
CREATE TABLE permissao (
id SERIAL PRIMARY KEY,
descricao VARCHAR(150)
);
CREATE TABLE perfil (
id SERIAL PRIMARY KEY,
nome VARCHAR(150),
descricao VARCHAR(150)
);
CREATE TABLE pessoa (
id SERIAL PRIMARY KEY UNIQUE,
documento varchar(15) UNIQUE,
nome varchar(50),
email varchar(100) UNIQUE,
idusuario SERIAL
);
CREATE TABLE multa(
id SERIAL PRIMARY KEY UNIQUE,
renavam varchar(30),
documento varchar(15),
datamulta timestamp,
descricao varchar(4000),
idinfracao SERIAL
);
CREATE TABLE pagamento(
id SERIAL PRIMARY KEY UNIQUE,
datapagamento timestamp,
atrasodias integer,
valor float,
idmulta SERIAL
);
CREATE TABLE pontuacaoveiculo(
id SERIAL PRIMARY KEY UNIQUE,
renavam varchar(30),
pontuacao integer,
dataultima timestamp
);
CREATE TABLE infracao(
id SERIAL PRIMARY KEY UNIQUE,
descricao varchar(4000),
idtipo SERIAL
);
CREATE TABLE tipoinfracao(
id SERIAL PRIMARY KEY UNIQUE,
descricao varchar(4000),
pontuacao integer,
valor float,
UNIQUE(descricao,pontuacao)
);
ALTER TABLE pessoa ADD CONSTRAINT FK_pessoa_1
FOREIGN KEY (idusuario)
REFERENCES usuario (id);
ALTER TABLE usuario ADD CONSTRAINT FK_usuario_1
FOREIGN KEY (tipoperfil)
REFERENCES perfil (id);
ALTER TABLE perfilpermissao ADD CONSTRAINT FK_perfilpermissao_1
FOREIGN KEY (idpermissao)
REFERENCES permissao (id);
ALTER TABLE perfilpermissao ADD CONSTRAINT FK_perfilpermissao_2
FOREIGN KEY (idperfil)
REFERENCES perfil (id);
ALTER TABLE multa ADD CONSTRAINT FK_multa_1
FOREIGN KEY (idinfracao)
REFERENCES infracao (id);
ALTER TABLE infracao ADD CONSTRAINT FK_infracao_1
FOREIGN KEY (idTipo)
REFERENCES tipoinfracao (id);
ALTER TABLE pagamento ADD CONSTRAINT FK_pagamento_1
FOREIGN KEY (idmulta)
REFERENCES multa (id);
insert into pontuacaoveiculo (renavam,pontuacao,dataultima) values
('44609582799',7,'20200701 10:34:09 AM'),
('67816544599',5,'20200702 10:34:09 AM'),
('02792712299',3,'20200703 10:34:09 AM'),
('92651193699',1,'20200704 10:34:09 AM'),
('12836031499',7,'20200705 10:34:09 AM'),
('80357878299',5,'20200706 10:34:09 AM'),
('31209155899',3,'20200707 10:34:09 AM');
insert into tipoinfracao(descricao,pontuacao,valor) values
('Gravissima',7,293.00),
('Grave',5,195.23),
('Media',3,130.16),
('Leve',1,88.38);
insert into infracao(descricao,idtipo) values
('conduzir sem possuir CNH ou com documento suspenso',1),
('Conduzir veículo de categoria diferente da que a pessoa está habilitada',1),
('Dirigir após consumir bebida alcoólica ou drogas',1),
('Não usar cinco de segurança, válido para todos os ocupantes do veículo;',2),
('Deixar de prestar socorro a vítima de trânsito quando solicitado;',2),
('Estacionar a mais de um metro do meio-fio;',2),
('Parar o veículo em um cruzamento;',3),
('Parar o veículo em viadutos, pontes ou túneis;',3),
('Utilizar o veículo para jogar água nos pedestres;',3),
('Dirigir sem estar com a CNH ou documento do veículo;',4),
('Estacionar na calçada ou na faixa de pedestre;',4),
('Estacionar no acostamento;',4);
insert into multa(renavam,documento,datamulta,descricao,idinfracao) values
('44609582799','29359062240','20200701 10:34:09 AM','descricao1',1),
('67816544599','87585785339','20200702 10:34:09 AM','descricao2',4),
('02792712299','03759909954','20200703 10:34:09 AM','descricao3',8),
('92651193699','62743618858','20200704 10:34:09 AM','descricao4',12),
('12836031499','66651836977','20200705 10:34:09 AM','descricao5',2),
('80357878299','66651836977','20200706 10:34:09 AM','descricao6',5),
('31209155899','23116639390','20200707 10:34:09 AM','descricao7',9),
('66752741999','60806789850','20200708 10:34:09 AM','descricao8',1),
('04361240399','06792335207','20200709 10:34:09 AM','descricao9',4),
('54944522699','70179153872','20200710 10:34:09 AM','descricao10',7),
('46414579599','66651836977','20200711 10:34:09 AM','descricao11',10),
('50228117499','54456370568','20200712 10:34:09 AM','descricao12',12);
insert into pagamento (datapagamento,atrasodias,valor,idmulta) values
('20200808 13:34:09',31,351.6,8),
('20200709 14:34:09',0,195.23,9),
('20200710 15:34:09',0,130.16,10),
('20200712 16:34:09',1,88.38,11),
('20200714 17:34:09',2,88.38,12);
insert into permissao (descricao) values
('ISADMIN'),
('READ_EMPLOYEE'),
('WRITE_EMPLOYEE'),
('READ_SOMETHING'),
('WRITE_SOMETHING'),
('READ_SOMETIMES');
insert into perfil (nome,descricao) values
('ADMINISTRADOR','ADMINISTRADOR'),
('POLICIAL','PULISSA'),
('CONDUTOR','CONDUTOR');
insert into perfilpermissao (idperfil,idpermissao)values
(1,1),(1,2),(1,3),(1,4),(1,5),(1,6),
(2,2),(2,3),(2,4),(2,5),(2,6),
(3,4),(3,5),(3,6);
insert into usuario(login,tipoperfil,senha)values
('condutor1',3,'condutor1'),
('condutor2',3,'condutor2'),
('condutor3',3,'condutor3'),
('condutor4',3,'condutor4'),
('condutor5',3,'condutor5'),
('condutor6',3,'condutor6'),
('condutor7',3,'condutor7'),
('condutor8',3,'condutor8'),
('condutor9',3,'condutor9'),
('condutor10',3,'condutor10'),
('policial1',2,'policial1'),
('policial2',2,'policial2'),
('policial3',2,'policial3'),
('admin',1,'admin');
insert into pessoa (documento,nome,email,idusuario) values
('29359062240','Christen','nibh.vulputate@ametdiameu.co.uk',1),
('87585785339','Kathleen','accumsan@nec.org',2),
('03759909954','Paul','commodo.hendrerit.Donec@ligulaAeneangravida.edu',3),
('62743618858','Kylynn','auctor.nunc.nulla@ipsumdolor.org',4),
('66651836977','Isaiah','tempus@ultricesposuerecubilia.co.uk',5),
('23116639390','Alexis','odio.Nam@lobortisrisusIn.org',6),
('60806789850','Melyssa','tellus@justo.org',7),
('06792335207','Bianca','tincidunt.dui@antelectus.edu',8),
('70179153872','Lyle','vulputate@consectetuer.com',9),
('54456370568','Uriah','dapibus.rutrum.justo@malesuadaid.org',10),
('11122233344','Policial1','policial1@gmail.com',11),
('22233344455','Policial2','policial2@gmail.com',12),
('33344455566','Policial3','policial3@gmail.com',13),
('11111111111','Administrador','admin@admin.com',14);
|
ALTER TABLE `badge_view` CHANGE COLUMN `badge_id` user_badge_id bigint(20);
--;;
ALTER TABLE `badge_tag` CHANGE COLUMN `badge_id` user_badge_id bigint(20);
--;;
ALTER TABLE `badge_congratulation` CHANGE COLUMN `badge_id` user_badge_id bigint(20);
|
CREATE TABLE `badge` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) unsigned DEFAULT NULL,
`email` varchar(255) NOT NULL,
`assertion_url` varchar(500) DEFAULT NULL,
`assertion_jws` text,
`assertion_json` text,
`badge_url` varchar(500) DEFAULT NULL,
`issuer_url` varchar(500) DEFAULT NULL,
`creator_url` varchar(500) DEFAULT NULL,
`criteria_url` varchar(500) DEFAULT NULL,
`criteria_content_id` varchar(255) DEFAULT NULL,
`badge_content_id` varchar(255) DEFAULT NULL,
`issuer_content_id` varchar(255) DEFAULT NULL,
`creator_content_id` varchar(255) DEFAULT NULL,
`issued_on` bigint(20) unsigned DEFAULT NULL,
`expires_on` bigint(20) unsigned DEFAULT NULL,
`evidence_url` varchar(500) DEFAULT NULL,
`status` enum('pending','accepted','declined') DEFAULT 'pending',
`visibility` enum('private','internal','public') DEFAULT 'private',
`show_recipient_name` boolean DEFAULT 0,
`rating` decimal(2,1) DEFAULT NULL,
`ctime` bigint(20) unsigned NOT NULL,
`mtime` bigint(20) unsigned NOT NULL,
`deleted` boolean DEFAULT 0,
`revoked` boolean DEFAULT 0,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--;;
CREATE TABLE `badge_content` (
`id` varchar(255) NOT NULL,
`name` text,
`description` text,
`image_file` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--;;
CREATE TABLE `badge_content_alignment` (
`badge_content_id` varchar(255) NOT NULL,
`name` varchar(255) NOT NULL,
`url` varchar(500) NOT NULL,
`description` text,
PRIMARY KEY (`badge_content_id`,`name`,`url`(255))
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--;;
CREATE TABLE `badge_content_tag` (
`badge_content_id` varchar(255) NOT NULL,
`tag` varchar(255) DEFAULT NULL,
PRIMARY KEY (`badge_content_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--;;
CREATE TABLE `badge_tag` (
`badge_id` bigint(20) unsigned NOT NULL,
`tag` varchar(255) NOT NULL,
PRIMARY KEY (`badge_id`,`tag`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--;;
CREATE TABLE `issuer_content` (
`id` varchar(255) NOT NULL,
`name` text,
`url` varchar(500) DEFAULT NULL,
`description` text,
`image_file` varchar(255) DEFAULT NULL,
`email` varchar(255) DEFAULT NULL,
`revocation_list_url` varchar(500) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--;;
CREATE TABLE `criteria_content` (
`id` varchar(255) NOT NULL,
`html_content` mediumtext,
`markdown_content` mediumtext,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
SELECT * FROM
(SELECT city, length(city)
FROM station
ORDER BY length(city) asc, city)
WHERE rownum = 1;
SELECT * FROM
(SELECT city, length(city)
FROM station
ORDER BY length(city) desc, city)
WHERE rownum = 1; |
use bd_projeto;
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: bd_projeto
-- ------------------------------------------------------
-- Server version 5.7.21
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `detalheos`
--
DROP TABLE IF EXISTS `detalheos`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `detalheos` (
`idDetalhesOs` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`idDetalhesOs`),
UNIQUE KEY `idDetalhesOs_UNIQUE` (`idDetalhesOs`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `detalheos`
--
LOCK TABLES `detalheos` WRITE;
/*!40000 ALTER TABLE `detalheos` DISABLE KEYS */;
INSERT INTO `detalheos` VALUES (1);
/*!40000 ALTER TABLE `detalheos` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `login`
--
DROP TABLE IF EXISTS `login`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `login` (
`idlogin` int(11) NOT NULL AUTO_INCREMENT,
`usuario` varchar(30) NOT NULL,
`senha` varchar(30) NOT NULL,
PRIMARY KEY (`idlogin`),
UNIQUE KEY `idlogin_UNIQUE` (`idlogin`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `login`
--
LOCK TABLES `login` WRITE;
/*!40000 ALTER TABLE `login` DISABLE KEYS */;
INSERT INTO `login` VALUES (1,'IagoGay','2424');
/*!40000 ALTER TABLE `login` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `maquina`
--
DROP TABLE IF EXISTS `maquina`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `maquina` (
`idmaquina` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`idmaquina`),
UNIQUE KEY `idmaquina_UNIQUE` (`idmaquina`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `maquina`
--
LOCK TABLES `maquina` WRITE;
/*!40000 ALTER TABLE `maquina` DISABLE KEYS */;
INSERT INTO `maquina` VALUES (1);
/*!40000 ALTER TABLE `maquina` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `ordemservico`
--
DROP TABLE IF EXISTS `ordemservico`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ordemservico` (
`idOrdemServico` int(11) NOT NULL AUTO_INCREMENT,
`titulo` varchar(45) NOT NULL,
`descricao` varchar(500) NOT NULL,
`status` varchar(45) DEFAULT NULL,
`setor` varchar(45) DEFAULT NULL,
`dataEmissaoOs` date DEFAULT NULL,
`tipoManutencao` varchar(45) DEFAULT NULL,
`parada` tinyint(4) DEFAULT NULL,
`prioridade` int(11) DEFAULT NULL,
`dataInicio` date DEFAULT NULL,
`dataFim` date DEFAULT NULL,
`idmaquina` int(11) DEFAULT NULL,
`idUsuario` int(11) DEFAULT NULL,
`idDetalheOs` int(11) DEFAULT NULL,
PRIMARY KEY (`idOrdemServico`),
UNIQUE KEY `idOrdemServico_UNIQUE` (`idOrdemServico`),
KEY `idUsuario_idx` (`idUsuario`),
KEY `idDetalheOs_idx` (`idDetalheOs`),
KEY `idMaquina_idx` (`idmaquina`),
CONSTRAINT `idDetalheOs` FOREIGN KEY (`idDetalheOs`) REFERENCES `detalheos` (`idDetalhesOs`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `idUsuario` FOREIGN KEY (`idUsuario`) REFERENCES `usuario` (`idusuario`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `idmaquina` FOREIGN KEY (`idmaquina`) REFERENCES `maquina` (`idmaquina`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `ordemservico`
--
LOCK TABLES `ordemservico` WRITE;
/*!40000 ALTER TABLE `ordemservico` DISABLE KEYS */;
INSERT INTO `ordemservico` VALUES (1,'primeira OS01','Descrição OS01','Aberto','setor01','2019-05-13','tipo01',0,1,'2019-05-14','2019-05-15',1,1,1);
/*!40000 ALTER TABLE `ordemservico` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `usuario`
--
DROP TABLE IF EXISTS `usuario`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `usuario` (
`idusuario` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`idusuario`),
UNIQUE KEY `idusuario_UNIQUE` (`idusuario`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `usuario`
--
LOCK TABLES `usuario` WRITE;
/*!40000 ALTER TABLE `usuario` DISABLE KEYS */;
INSERT INTO `usuario` VALUES (1);
/*!40000 ALTER TABLE `usuario` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Dumping events for database 'bd_projeto'
--
--
-- Dumping routines for database 'bd_projeto'
--
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2019-05-13 20:59:59
|
column statistic format a25
select *
from V$PX_PROCESS_SYSSTAT
--where STATISTIC like 'Servers%'
order by 1;
/*
STATISTIC VALUE CON_ID
------------------------- ---------- ----------
TATISTIC VALUE CON_ID
------------------------- ---------- ----------
Buffers Allocated 0 0
Buffers Current 0 0
Buffers Freed 0 0
Buffers HWM 0 0
Memory Chunks Allocated 4 0
Memory Chunks Current 4 0
Memory Chunks Freed 0 0
Memory Chunks HWM 4 0
Server Sessions 0 0
Servers Available 8 0
Servers Cleaned Up 0 0
Servers Highwater 0 0
Servers In Use 0 0
Servers Shutdown 0 0
Servers Started 8 0
*/
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.