Skip to main content

MySQL views with union

// TODO tách dòng tạo view ra cho dễ coi
// Thêm 1 số vd tạo view bá đạo khác.
// Note Æ°u/nhược Ä‘iểm của views 
    
| vTempReportScore | CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vTempReportScore` AS select `TempReportScore`.`C1` AS `score`,'C1' AS `ItemID`,`TempReportScore`.`TempReportID` AS `TempReportID` from `TempReportScore` union all select `TempReportScore`.`C2` AS `score`,'C2' AS `ItemID`,`TempReportScore`.`TempReportID` AS `TempReportID` from `TempReportScore` union all select `TempReportScore`.`C3` AS `score`,'C3' AS `ItemID`,`TempReportScore`.`TempReportID` AS `TempReportID` from `TempReportScore` union all select `TempReportScore`.`C4` AS `score`,'C4' AS `ItemID`,`TempReportScore`.`TempReportID` AS `TempReportID` from `TempReportScore` union all select `TempReportScore`.`C5` AS `score`,'C5' AS `ItemID`,`TempReportScore`.`TempReportID` AS `TempReportID` from `TempReportScore` union all select `TempReportScore`.`C6` AS `score`,'C6' AS `ItemID`,`TempReportScore`.`TempReportID` AS `TempReportID` from `TempReportScore` union all select `TempReportScore`.`C7` AS `score`,'C7' AS `ItemID`,`TempReportScore`.`TempReportID` AS `TempReportID` from `TempReportScore` union all select `TempReportScore`.`C8` AS `score`,'C8' AS `ItemID`,`TempReportScore`.`TempReportID` AS `TempReportID` from `TempReportScore` union all select `TempReportScore`.`C9` AS `score`,'C9' AS `ItemID`,`TempReportScore`.`TempReportID` AS `TempReportID` from `TempReportScore` union all select `TempReportScore`.`C10` AS `score`,'C10' AS `ItemID`,`TempReportScore`.`TempReportID` AS `TempReportID` from `TempReportScore` union all select `TempReportScore`.`C11` AS `score`,'C11' AS `ItemID`,`TempReportScore`.`TempReportID` AS `TempReportID` from `TempReportScore` union all select `TempReportScore`.`C12` AS `score`,'C12' AS `ItemID`,`TempReportScore`.`TempReportID` AS `TempReportID` from `TempReportScore` union all select `TempReportScore`.`C13` AS `score`,'C13' AS `ItemID`,`TempReportScore`.`TempReportID` AS `TempReportID` from `TempReportScore` union all select `TempReportScore`.`C14` AS `score`,'C14' AS `ItemID`,`TempReportScore`.`TempReportID` AS `TempReportID` from `TempReportScore` union all select `TempReportScore`.`C15` AS `score`,'C15' AS `ItemID`,`TempReportScore`.`TempReportID` AS `TempReportID` from `TempReportScore` union all select `TempReportScore`.`C16` AS `score`,'C16' AS `ItemID`,`TempReportScore`.`TempReportID` AS `TempReportID` from `TempReportScore` union all select `TempReportScore`.`C17` AS `score`,'C17' AS `ItemID`,`TempReportScore`.`TempReportID` AS `TempReportID` from `TempReportScore` union all select `TempReportScore`.`C18` AS `score`,'C18' AS `ItemID`,`TempReportScore`.`TempReportID` AS `TempReportID` from `TempReportScore` union all select `TempReportScore`.`C19` AS `score`,'C19' AS `ItemID`,`TempReportScore`.`TempReportID` AS `TempReportID` from `TempReportScore` union all select `TempReportScore`.`C20` AS `score`,'C20' AS `ItemID`,`TempReportScore`.`TempReportID` AS `TempReportID` from `TempReportScore` union all select `TempReportScore`.`C21` AS `score`,'C21' AS `ItemID`,`TempReportScore`.`TempReportID` AS `TempReportID` from `TempReportScore` union all select `TempReportScore`.`C22` AS `score`,'C22' AS `ItemID`,`TempReportScore`.`TempReportID` AS `TempReportID` from `TempReportScore` union all select `TempReportScore`.`C23` AS `score`,'C23' AS `ItemID`,`TempReportScore`.`TempReportID` AS `TempReportID` from `TempReportScore` union all select `TempReportScore`.`C24` AS `score`,'C24' AS `ItemID`,`TempReportScore`.`TempReportID` AS `TempReportID` from `TempReportScore` union all select `TempReportScore`.`C25` AS `score`,'C25' AS `ItemID`,`TempReportScore`.`TempReportID` AS `TempReportID` from `TempReportScore` | utf8                 | utf8_general_ci      |
+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


---------------------------------------------------+----------------------+----------------------+
| vTempReportScoreCompany | CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER 

VIEW `vTempReportScoreCompany` AS select `TempReportScoreCompany`.`C1` AS `score`,'C1' AS `ItemID`,`TempReportScoreCompany`.`TempReportID` AS `TempReportID` from `TempReportScoreCompany` union all select `TempReportScoreCompany`.`C2` AS `score`,'C2' AS `ItemID`,`TempReportScoreCompany`.`TempReportID` AS `TempReportID` from `TempReportScoreCompany` union all select `TempReportScoreCompany`.`C3` AS `score`,'C3' AS `ItemID`,`TempReportScoreCompany`.`TempReportID` AS `TempReportID` from `TempReportScoreCompany` union all select `TempReportScoreCompany`.`C4` AS `score`,'C4' AS `ItemID`,`TempReportScoreCompany`.`TempReportID` AS `TempReportID` from `TempReportScoreCompany` union all select `TempReportScoreCompany`.`C5` AS `score`,'C5' AS `ItemID`,`TempReportScoreCompany`.`TempReportID` AS `TempReportID` from `TempReportScoreCompany` union all select `TempReportScoreCompany`.`C6` AS `score`,'C6' AS `ItemID`,`TempReportScoreCompany`.`TempReportID` AS `TempReportID` from `TempReportScoreCompany` union all select `TempReportScoreCompany`.`C7` AS `score`,'C7' AS `ItemID`,`TempReportScoreCompany`.`TempReportID` AS `TempReportID` from `TempReportScoreCompany` union all select `TempReportScoreCompany`.`C8` AS `score`,'C8' AS `ItemID`,`TempReportScoreCompany`.`TempReportID` AS `TempReportID` from `TempReportScoreCompany` union all select `TempReportScoreCompany`.`C9` AS `score`,'C9' AS `ItemID`,`TempReportScoreCompany`.`TempReportID` AS `TempReportID` from `TempReportScoreCompany` union all select `TempReportScoreCompany`.`C10` AS `score`,'C10' AS `ItemID`,`TempReportScoreCompany`.`TempReportID` AS `TempReportID` from `TempReportScoreCompany` union all select `TempReportScoreCompany`.`C11` AS `score`,'C11' AS `ItemID`,`TempReportScoreCompany`.`TempReportID` AS `TempReportID` from `TempReportScoreCompany` union all select `TempReportScoreCompany`.`C12` AS `score`,'C12' AS `ItemID`,`TempReportScoreCompany`.`TempReportID` AS `TempReportID` from `TempReportScoreCompany` union all select `TempReportScoreCompany`.`C13` AS `score`,'C13' AS `ItemID`,`TempReportScoreCompany`.`TempReportID` AS `TempReportID` from `TempReportScoreCompany` union all select `TempReportScoreCompany`.`C14` AS `score`,'C14' AS `ItemID`,`TempReportScoreCompany`.`TempReportID` AS `TempReportID` from `TempReportScoreCompany` union all select `TempReportScoreCompany`.`C15` AS `score`,'C15' AS `ItemID`,`TempReportScoreCompany`.`TempReportID` AS `TempReportID` from `TempReportScoreCompany` union all select `TempReportScoreCompany`.`C16` AS `score`,'C16' AS `ItemID`,`TempReportScoreCompany`.`TempReportID` AS `TempReportID` from `TempReportScoreCompany` union all select `TempReportScoreCompany`.`C17` AS `score`,'C17' AS `ItemID`,`TempReportScoreCompany`.`TempReportID` AS `TempReportID` from `TempReportScoreCompany` union all select `TempReportScoreCompany`.`C18` AS `score`,'C18' AS `ItemID`,`TempReportScoreCompany`.`TempReportID` AS `TempReportID` from `TempReportScoreCompany` union all select `TempReportScoreCompany`.`C19` AS `score`,'C19' AS `ItemID`,`TempReportScoreCompany`.`TempReportID` AS `TempReportID` from `TempReportScoreCompany` union all select `TempReportScoreCompany`.`C20` AS `score`,'C20' AS `ItemID`,`TempReportScoreCompany`.`TempReportID` AS `TempReportID` from `TempReportScoreCompany` union all select `TempReportScoreCompany`.`C21` AS `score`,'C21' AS `ItemID`,`TempReportScoreCompany`.`TempReportID` AS `TempReportID` from `TempReportScoreCompany` union all select `TempReportScoreCompany`.`C22` AS `score`,'C22' AS `ItemID`,`TempReportScoreCompany`.`TempReportID` AS `TempReportID` from `TempReportScoreCompany` union all select `TempReportScoreCompany`.`C23` AS `score`,'C23' AS `ItemID`,`TempReportScoreCompany`.`TempReportID` AS `TempReportID` from `TempReportScoreCompany` union all select `TempReportScoreCompany`.`C24` AS `score`,'C24' AS `ItemID`,`TempReportScoreCompany`.`TempReportID` AS `TempReportID` from `TempReportScoreCompany` union all select `TempReportScoreCompany`.`C25` AS `score`,'C25' AS `ItemID`,`TempReportScoreCompany`.`TempReportID` AS `TempReportID` from `TempReportScoreCompany`

 | utf8                 | utf8_general_ci      |
+-------------------------+-------------------------------------------------------------------------------------------------------



mysql> show create table TempReportAnswerRaw;
-------------------------------------------------------------------------------------------------------------------------+
| TempReportAnswerRaw | CREATE TABLE `TempReportAnswerRaw` (
  `TempReportID` int(11) NOT NULL DEFAULT '0' COMMENT 'TempReportBaseItem.TempReportID',
  `AnswerNo` tinyint(2) NOT NULL COMMENT '',
  `AnswerValue` int(1) DEFAULT NULL COMMENT '',
  `Status` varchar(2) DEFAULT 'no',
  `Bimage` mediumtext,
  `SFDC_Id` varchar(20) DEFAULT NULL,
  `SystemModStamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  UNIQUE KEY `TempReportID` (`TempReportID`,`AnswerNo`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT=''                                                                                              |
+---------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> show create table TempReportBaseItem;
+-----
| TempReportBaseItem | CREATE TABLE `TempReportBaseItem` (
  `TempReportID` int(11) NOT NULL AUTO_INCREMENT,
  `CandidateID` int(11) DEFAULT NULL COMMENT '',
  `Business` varchar(255) DEFAULT NULL COMMENT '',
  `EmployeesNum` varchar(255) DEFAULT NULL COMMENT '',
  `Capital` varchar(255) DEFAULT NULL COMMENT '',
  `Post` varchar(255) DEFAULT NULL COMMENT '',
  `JobCategory` varchar(255) DEFAULT NULL COMMENT '',
  `DateOfBirth` date DEFAULT NULL COMMENT '',
  `Sex` char(2) DEFAULT NULL COMMENT '',
  `AnswerPurpose` varchar(255) DEFAULT NULL COMMENT '',
  `AnswerPurposeOtherText` varchar(100) DEFAULT NULL COMMENT '',
  `Progress` varchar(4) DEFAULT NULL COMMENT '',
  `Status` char(2) DEFAULT NULL COMMENT '',
  `is_paid` tinyint(1) NOT NULL DEFAULT '0',
  `payment_date` datetime DEFAULT NULL,
  `ModDate` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新日時',
  `Preliminary1` varchar(255) DEFAULT NULL COMMENT '',
  `Preliminary2` varchar(255) DEFAULT NULL COMMENT '',
  `Preliminary3` varchar(255) DEFAULT NULL COMMENT '',
  `Preliminary4` varchar(255) DEFAULT NULL COMMENT '',
  `Preliminary5` varchar(255) DEFAULT NULL COMMENT '',
  `Preliminary6` varchar(255) DEFAULT NULL COMMENT '',
  `ComputationDate` timestamp NULL DEFAULT NULL COMMENT '',
  `ResponseDate` timestamp NULL DEFAULT NULL COMMENT '',
  `SurveyVersion` varchar(255) DEFAULT NULL COMMENT ' ',
  `ReferenceVersion` varchar(255) DEFAULT NULL COMMENT '',
  `CommentsVersion` varchar(255) DEFAULT NULL COMMENT '',
  `RegDate` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '',
  `SystemModStamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `Bimage` mediumtext,
  `SFDC_Id` varchar(20) DEFAULT NULL COMMENT '',
  `SFDC_lead` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`TempReportID`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='' |
+--------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 row in set (0.00 sec)

mysql> show create table TempReportScore;
+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

| TempReportScore | CREATE TABLE `TempReportScore` (
  `TempReportScoreID` int(11) NOT NULL AUTO_INCREMENT COMMENT '',
  `TempReportID` int(11) DEFAULT '0' COMMENT '',
  `C1` decimal(17,15) DEFAULT '0.000000000000000' COMMENT '',
  `C2` decimal(17,15) DEFAULT '0.000000000000000' COMMENT '',
  `C3` decimal(17,15) DEFAULT '0.000000000000000' COMMENT '',
  `C4` decimal(17,15) DEFAULT '0.000000000000000' COMMENT '',
  `C5` decimal(17,15) DEFAULT '0.000000000000000' COMMENT '',
  `C6` decimal(17,15) DEFAULT '0.000000000000000' COMMENT '',
  `C7` decimal(17,15) DEFAULT '0.000000000000000' COMMENT '',
  `C8` decimal(17,15) DEFAULT '0.000000000000000' COMMENT '',
  `C9` decimal(17,15) DEFAULT '0.000000000000000' COMMENT '',
  `C10` decimal(17,15) DEFAULT '0.000000000000000' COMMENT '',
  `C11` decimal(17,15) DEFAULT '0.000000000000000' COMMENT '',
  `C12` decimal(17,15) DEFAULT '0.000000000000000' COMMENT '',
  `C13` decimal(17,15) DEFAULT '0.000000000000000' COMMENT '',
  `C14` decimal(17,15) DEFAULT '0.000000000000000' COMMENT '',
  `C15` decimal(17,15) DEFAULT '0.000000000000000' COMMENT '',
  `C16` decimal(17,15) DEFAULT '0.000000000000000' COMMENT '',
  `C17` decimal(17,15) DEFAULT '0.000000000000000' COMMENT '',
  `C18` decimal(17,15) DEFAULT '0.000000000000000' COMMENT '',
  `C19` decimal(17,15) DEFAULT '0.000000000000000' COMMENT '',
  `C20` decimal(17,15) DEFAULT '0.000000000000000' COMMENT '',
  `C21` decimal(17,15) DEFAULT '0.000000000000000' COMMENT '',
  `C22` decimal(17,15) DEFAULT '0.000000000000000' COMMENT '',
  `C23` decimal(17,15) DEFAULT '0.000000000000000' COMMENT '',
  `C24` decimal(17,15) DEFAULT '0.000000000000000' COMMENT '',
  `C25` decimal(17,15) DEFAULT '0.000000000000000' COMMENT '',
  `Status` char(2) DEFAULT NULL COMMENT '',
  `ModDate` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '',
  `RegDate` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '',
  `SystemModStamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `Bimage` mediumtext,
  `SFDC_Id` varchar(20) DEFAULT NULL COMMENT '',
  `SFDC_lead` varchar(20) DEFAULT NULL,
  `CandidateID` int(11) DEFAULT NULL,
  PRIMARY KEY (`TempReportScoreID`)
) ENGINE=InnoDB AUTO_INCREMENT=200 DEFAULT CHARSET=utf8 COMMENT='' |


mysql> show create table TempReportRawScore;
+--------------------+----------------------------------------------------------------------------------------------------------
| TempReportRawScore | CREATE TABLE `TempReportRawScore` (
  `RawScoreID` int(11) NOT NULL AUTO_INCREMENT COMMENT '',
  `TempReportID` int(11) NOT NULL DEFAULT '0' COMMENT '',
  `C1` decimal(17,15) NOT NULL DEFAULT '0.000000000000000' COMMENT '',
  `C2` decimal(17,15) NOT NULL DEFAULT '0.000000000000000' COMMENT '',
  `C3` decimal(17,15) NOT NULL DEFAULT '0.000000000000000' COMMENT '',
  `C4` decimal(17,15) NOT NULL DEFAULT '0.000000000000000' COMMENT '',
  `C5` decimal(17,15) NOT NULL DEFAULT '0.000000000000000' COMMENT '',
  `C6` decimal(17,15) NOT NULL DEFAULT '0.000000000000000' COMMENT '',
  `C7` decimal(17,15) NOT NULL DEFAULT '0.000000000000000' COMMENT '',
  `C8` decimal(17,15) NOT NULL DEFAULT '0.000000000000000' COMMENT '',
  `C9` decimal(17,15) NOT NULL DEFAULT '0.000000000000000' COMMENT '',
  `C10` decimal(17,15) NOT NULL DEFAULT '0.000000000000000' COMMENT '',
  `C11` decimal(17,15) NOT NULL DEFAULT '0.000000000000000' COMMENT '',
  `C12` decimal(17,15) NOT NULL DEFAULT '0.000000000000000' COMMENT '',
  `C13` decimal(17,15) NOT NULL DEFAULT '0.000000000000000' COMMENT '',
  `C14` decimal(17,15) NOT NULL DEFAULT '0.000000000000000' COMMENT '',
  `C15` decimal(17,15) NOT NULL DEFAULT '0.000000000000000' COMMENT '',
  `C16` decimal(17,15) NOT NULL DEFAULT '0.000000000000000' COMMENT '',
  `C17` decimal(17,15) NOT NULL DEFAULT '0.000000000000000' COMMENT '',
  `C18` decimal(17,15) NOT NULL DEFAULT '0.000000000000000' COMMENT '',
  `C19` decimal(17,15) NOT NULL DEFAULT '0.000000000000000' COMMENT '',
  `C20` decimal(17,15) NOT NULL DEFAULT '0.000000000000000' COMMENT '',
  `C21` decimal(17,15) NOT NULL DEFAULT '0.000000000000000' COMMENT '',
  `C22` decimal(17,15) NOT NULL DEFAULT '0.000000000000000' COMMENT '',
  `C23` decimal(17,15) NOT NULL DEFAULT '0.000000000000000' COMMENT '',
  `C24` decimal(17,15) NOT NULL DEFAULT '0.000000000000000' COMMENT '',
  `C25` decimal(17,15) NOT NULL DEFAULT '0.000000000000000' COMMENT '',
  `Status` char(4) NOT NULL COMMENT '',
  `ModDate` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '',
  `RegDate` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '',
  `Bimage` mediumtext,
  `SFDC_Id` varchar(20) DEFAULT NULL,
  `SystemModStamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`RawScoreID`,`TempReportID`)
) ENGINE=InnoDB AUTO_INCREMENT=200 DEFAULT CHARSET=utf8 COMMENT='' |





mysql> desc TempReportScore;
+-------------------+----------------+------+-----+-------------------+-----------------------------+
| Field             | Type           | Null | Key | Default           | Extra                       |
+-------------------+----------------+------+-----+-------------------+-----------------------------+
| TempReportScoreID | int(11)        | NO   | PRI | NULL              | auto_increment              |
| TempReportID      | int(11)        | YES  |     | 0                 |                             |
| C1                | decimal(17,15) | YES  |     | 0.000000000000000 |                             |
| C2                | decimal(17,15) | YES  |     | 0.000000000000000 |                             |
| C3                | decimal(17,15) | YES  |     | 0.000000000000000 |                             |
| C4                | decimal(17,15) | YES  |     | 0.000000000000000 |                             |
| C5                | decimal(17,15) | YES  |     | 0.000000000000000 |                             |
| C6                | decimal(17,15) | YES  |     | 0.000000000000000 |                             |
| C7                | decimal(17,15) | YES  |     | 0.000000000000000 |                             |
| C8                | decimal(17,15) | YES  |     | 0.000000000000000 |                             |
| C9                | decimal(17,15) | YES  |     | 0.000000000000000 |                             |
| C10               | decimal(17,15) | YES  |     | 0.000000000000000 |                             |
| C11               | decimal(17,15) | YES  |     | 0.000000000000000 |                             |
| C12               | decimal(17,15) | YES  |     | 0.000000000000000 |                             |
| C13               | decimal(17,15) | YES  |     | 0.000000000000000 |                             |
| C14               | decimal(17,15) | YES  |     | 0.000000000000000 |                             |
| C15               | decimal(17,15) | YES  |     | 0.000000000000000 |                             |
| C16               | decimal(17,15) | YES  |     | 0.000000000000000 |                             |
| C17               | decimal(17,15) | YES  |     | 0.000000000000000 |                             |
| C18               | decimal(17,15) | YES  |     | 0.000000000000000 |                             |
| C19               | decimal(17,15) | YES  |     | 0.000000000000000 |                             |
| C20               | decimal(17,15) | YES  |     | 0.000000000000000 |                             |
| C21               | decimal(17,15) | YES  |     | 0.000000000000000 |                             |
| C22               | decimal(17,15) | YES  |     | 0.000000000000000 |                             |
| C23               | decimal(17,15) | YES  |     | 0.000000000000000 |                             |
| C24               | decimal(17,15) | YES  |     | 0.000000000000000 |                             |
| C25               | decimal(17,15) | YES  |     | 0.000000000000000 |                             |
| Status            | char(2)        | YES  |     | NULL              |                             |
| ModDate           | timestamp      | YES  |     | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
| RegDate           | timestamp      | YES  |     | CURRENT_TIMESTAMP |                             |
| SystemModStamp    | timestamp      | YES  |     | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
| Bimage            | mediumtext     | YES  |     | NULL              |                             |
| SFDC_Id           | varchar(20)    | YES  |     | NULL              |                             |
| SFDC_lead         | varchar(20)    | YES  |     | NULL              |                             |
| CandidateID       | int(11)        | YES  |     | NULL              |                             |
+-------------------+----------------+------+-----+-------------------+-----------------------------+
35 rows in set (0.00 sec)

mysql> desc TempReportRawScore;
+----------------+----------------+------+-----+-------------------+-----------------------------+
| Field          | Type           | Null | Key | Default           | Extra                       |
+----------------+----------------+------+-----+-------------------+-----------------------------+
| RawScoreID     | int(11)        | NO   | PRI | NULL              | auto_increment              |
| TempReportID   | int(11)        | NO   | PRI | 0                 |                             |
| C1             | decimal(17,15) | NO   |     | 0.000000000000000 |                             |
| C2             | decimal(17,15) | NO   |     | 0.000000000000000 |                             |
| C3             | decimal(17,15) | NO   |     | 0.000000000000000 |                             |
| C4             | decimal(17,15) | NO   |     | 0.000000000000000 |                             |
| C5             | decimal(17,15) | NO   |     | 0.000000000000000 |                             |
| C6             | decimal(17,15) | NO   |     | 0.000000000000000 |                             |
| C7             | decimal(17,15) | NO   |     | 0.000000000000000 |                             |
| C8             | decimal(17,15) | NO   |     | 0.000000000000000 |                             |
| C9             | decimal(17,15) | NO   |     | 0.000000000000000 |                             |
| C10            | decimal(17,15) | NO   |     | 0.000000000000000 |                             |
| C11            | decimal(17,15) | NO   |     | 0.000000000000000 |                             |
| C12            | decimal(17,15) | NO   |     | 0.000000000000000 |                             |
| C13            | decimal(17,15) | NO   |     | 0.000000000000000 |                             |
| C14            | decimal(17,15) | NO   |     | 0.000000000000000 |                             |
| C15            | decimal(17,15) | NO   |     | 0.000000000000000 |                             |
| C16            | decimal(17,15) | NO   |     | 0.000000000000000 |                             |
| C17            | decimal(17,15) | NO   |     | 0.000000000000000 |                             |
| C18            | decimal(17,15) | NO   |     | 0.000000000000000 |                             |
| C19            | decimal(17,15) | NO   |     | 0.000000000000000 |                             |
| C20            | decimal(17,15) | NO   |     | 0.000000000000000 |                             |
| C21            | decimal(17,15) | NO   |     | 0.000000000000000 |                             |
| C22            | decimal(17,15) | NO   |     | 0.000000000000000 |                             |
| C23            | decimal(17,15) | NO   |     | 0.000000000000000 |                             |
| C24            | decimal(17,15) | NO   |     | 0.000000000000000 |                             |
| C25            | decimal(17,15) | NO   |     | 0.000000000000000 |                             |
| Status         | char(4)        | NO   |     | NULL              |                             |
| ModDate        | timestamp      | YES  |     | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
| RegDate        | timestamp      | YES  |     | CURRENT_TIMESTAMP |                             |
| Bimage         | mediumtext     | YES  |     | NULL              |                             |
| SFDC_Id        | varchar(20)    | YES  |     | NULL              |                             |
| SystemModStamp | timestamp      | YES  |     | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
+----------------+----------------+------+-----+-------------------+-----------------------------+

mysql> desc Candidate;
+-----------------------------------+--------------+------+-----+-------------------+-----------------------------+
| Field                             | Type         | Null | Key | Default           | Extra                       |
+-----------------------------------+--------------+------+-----+-------------------+-----------------------------+
| CandidateID                       | int(11)      | NO   | PRI | NULL              | auto_increment              |
| MPIn_CandidateID__c               | int(11)      | YES  |     | NULL              |                             |
| MP_MemberID                       | varchar(255) | YES  |     | NULL              |                             |
| Email                             | varchar(255) | YES  |     | NULL              |                             |
| PasswordHash                      | varchar(255) | YES  |     | NULL              |                             |
| LastName                          | varchar(255) | YES  |     | NULL              |                             |
| FirstName                         | varchar(255) | YES  |     | NULL              |                             |
| NameKatarina                      | varchar(255) | YES  |     | NULL              |                             |
| MobilePhone                       | varchar(50)  | YES  |     | NULL              |                             |
| Address                           | varchar(255) | YES  |     | NULL              |                             |
| Street                            | varchar(255) | YES  |     | NULL              |                             |
| City                              | varchar(255) | YES  |     | NULL              |                             |
| State                             | varchar(255) | YES  |     | NULL              |                             |
| beidu_youku_                      | varchar(20)  | YES  |     | NULL              |                             |
| MPIn_Company                      | varchar(255) | YES  |     | NULL              |                             |
| StartingDay                       | date         | YES  |     | NULL              |                             |
| WorkEndDate                       | date         | YES  |     | NULL              |                             |
| MPIn_ResumeUpdate                 | timestamp    | YES  |     | NULL              |                             |
| MP_MailMagazine                   | char(4)      | YES  |     | NULL              |                             |
| MPIn_loginSetup                   | char(4)      | YES  |     | NULL              |                             |
| Web_login_setup                   | char(4)      | YES  |     | NULL              |                             |
| MPOut_Login                       | char(4)      | YES  |     | NULL              |                             |
| ReferralsJobsPageRegistration     | char(8)      | YES  |     | NULL              |                             |
| MPIn_RecordDate                   | timestamp    | YES  |     | CURRENT_TIMESTAMP |                             |
| LastModifiedDate                  | timestamp    | YES  |     | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
| candidateOldID                    | varchar(16)  | YES  |     | NULL              |                             |
| MPOut_TopSetup                    | char(14)     | YES  |     | NULL              |                             |
| MPOut_Candi                       | char(4)      | YES  |     | NULL              |                             |
| MPOut_Information1                | varchar(255) | YES  |     | NULL              |                             |
| ScoutServiceApplication           | char(4)      | YES  |     | NULL              |                             |
| ScoutAvoidanceIndustryCompanyName | varchar(255) | YES  |     | NULL              |                             |
| ScoutInterestCompanyName          | varchar(256) | YES  |     | NULL              |                             |
| ScoutApplicationDate              | timestamp    | YES  |     | NULL              |                             |
| ScoutReleaseDate                  | timestamp    | YES  |     | NULL              |                             |
| MPIn_ResumeServiceApply           | char(4)      | YES  |     | NULL              |                             |
| ResumesApplicationDate            | timestamp    | YES  |     | NULL              |                             |
| ResumesReleaseDate                | timestamp    | YES  |     | NULL              |                             |
| MPIn_LastAccessDate               | timestamp    | YES  |     | NULL              |                             |
| SadHillRegDate                    | timestamp    | YES  |     | NULL              |                             |
| AuthString                        | varchar(128) | YES  |     | NULL              |                             |
| AuthKey                           | varchar(128) | YES  |     | NULL              |                             |
| AuthExpireDate                    | timestamp    | YES  |     | NULL              |                             |
| AuthActivateDate                  | timestamp    | YES  |     | NULL              |                             |
| RemoteIP                          | varchar(40)  | YES  |     | NULL              |                             |
| RemoteUA                          | varchar(512) | YES  |     | NULL              |                             |
| MPIn_SadHillStatus                | varchar(10)  | YES  |     | NULL              |                             |
| MPSadHillCemontery                | varchar(5)   | YES  |     | NULL              |                             |
| Bimage                            | mediumtext   | YES  |     | NULL              |                             |
| SFDC_Id                           | varchar(20)  | YES  |     | NULL              |                             |
| Company                           | varchar(255) | NO   |     | [未指定]          |                             |
| jid                               | text         | YES  |     | NULL              |                             |
| Age                               | int(11)      | YES  |     | NULL              |                             |
| blondie                           | int(11)      | YES  |     | NULL              |                             |
| Busi1                             | varchar(255) | YES  |     | NULL              |                             |
| Busi2                             | varchar(255) | YES  |     | NULL              |                             |
| Busi3                             | varchar(255) | YES  |     | NULL              |                             |
| Nenshu                            | int(11)      | YES  |     | NULL              |                             |
| School_name                       | varchar(255) | YES  |     | NULL              |                             |
| Gaku                              | char(4)      | YES  |     | NULL              |                             |
| Shinjoa                           | varchar(255) | YES  |     | NULL              |                             |
| Toeic                             | int(11)      | YES  |     | NULL              |                             |
| Speaking                          | varchar(10)  | YES  |     | NULL              |                             |
| Writing                           | varchar(10)  | YES  |     | NULL              |                             |
| Company1                          | varchar(50)  | YES  |     | NULL              |                             |
| Post1                             | varchar(50)  | YES  |     | NULL              |                             |
| Kimbeley1                         | varchar(20)  | YES  |     | NULL              |                             |
| Kimbeley1_end                     | varchar(20)  | YES  |     | NULL              |                             |
| Keiken1                           | varchar(100) | YES  |     | NULL              |                             |
| Shokumu1                          | text         | YES  |     | NULL              |                             |
| Company2                          | varchar(50)  | YES  |     | NULL              |                             |
| Post2                             | varchar(50)  | YES  |     | NULL              |                             |
| Kinz2                             | varchar(20)  | YES  |     | NULL              |                             |
| Kinz2_end                         | varchar(20)  | YES  |     | NULL              |                             |
| Keiken2                           | varchar(100) | YES  |     | NULL              |                             |
| Shokumu2                          | text         | YES  |     | NULL              |                             |
| Company3                          | varchar(50)  | YES  |     | NULL              |                             |
| Post3                             | varchar(50)  | YES  |     | NULL              |                             |
| Kinz3                             | varchar(20)  | YES  |     | NULL              |                             |
| Kinz3_end                         | varchar(20)  | YES  |     | NULL              |                             |
| GenjiGPS3                         | varchar(100) | YES  |     | NULL              |                             |
| Shok3                             | text         | YES  |     | NULL              |                             |
| hopeList                          | varchar(255) | YES  |     | NULL              |                             |
| Message                           | text         | YES  |     | NULL              |                             |
| ap                                | varchar(255) | YES  |     | NULL              |                             |
| vo                                | varchar(64)  | YES  |     | NULL              |                             |
| status_c                          | varchar(255) | YES  |     | NULL              |                             |
| UserLastModifiedDate              | timestamp    | YES  |     | NULL              |                             |
| MPIn_candidateCharge              | varchar(10)  | YES  |     | NULL              |                             |
| CmCode                            | varchar(11)  | YES  |     | NULL              |                             |
+-----------------------------------+--------------+------+-----+-------------------+-----------------------------+
89 rows in set (0.01 sec)

Comments

Popular posts from this blog

Rand mm 10

https://stackoverflow.com/questions/2447791/define-vs-const Oh const vs define, many time I got unexpected interview question. As this one, I do not know much or try to study this. My work flow, and I believe of many programmer is that search topic only when we have task or job to tackle. We ignore many 'basic', 'fundamental' documents, RTFM is boring. So I think it is a trade off between the two way of study language. And I think there are a bridge or balanced way to extract both advantage of two method. There are some huge issue with programmer like me that prevent we master some technique that take only little time if doing properly. For example, some Red Hat certificate program, lesson, course that I have learned during Collage gave our exceptional useful when it cover almost all topic while working with Linux. I remember it called something like RHEL (RedHat Enterprise Linux) Certificate... I think there are many tons of documents, guide n books about Linux bu

Martin Fowler - Software Architecture - Making Architecture matter

  https://martinfowler.com/architecture/ One can appreciate the point of this presentation when one's sense of code smell is trained, functional and utilized. Those controlling the budget as well as developer leads should understand the design stamina hypothesis, so that the appropriate focus and priority is given to internal quality - otherwise pay a high price soon. Andrew Farrell 8 months ago I love that he was able to give an important lesson on the “How?” of software architecture at the very end: delegate decisions to those with the time to focus on them. Very nice and straight-forward talk about the value of software architecture For me, architecture is the distribution of complexity in a system. And also, how subsystems communicate with each other. A battle between craftmanship and the economics and economics always win... https://hackernoon.com/applying-clean-architecture-on-web-application-with-modular-pattern-7b11f1b89011 1. Independent of Frameworks 2. Testable 3. Indepe