close

請先在 MySQL 資料庫建立以下資料表。

-- --------------------------------------------------------
--
-- 資料表結構 `dept`
--
CREATE TABLE `dept` (
  `id` int(10) UNSIGNED NOT NULL,
  `prvCode` varchar(2) NOT NULL,
  `cityCode` varchar(3) NOT NULL,
  `deptCode` varchar(3) NOT NULL,
  `deptName` varchar(50) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- 資料表的匯出資料 `dept`
--
INSERT INTO `dept` (`id`, `prvCode`, `cityCode`, `deptCode`, `deptName`) VALUES
(1, '64', '000', '000', '高雄市'),
(2, '64', '000', '010', '鹽埕區'),
(3, '64', '000', '020', '鼓山區'),
(4, '64', '000', '030', '左營區'),
(5, '64', '000', '040', '楠梓區'),
(6, '64', '000', '050', '三民區'),
(7, '64', '000', '060', '新興區'),
(8, '64', '000', '070', '前金區'),
(9, '64', '000', '080', '苓雅區'),
(10, '64', '000', '090', '前鎮區'),
(11, '64', '000', '100', '旗津區'),
(12, '64', '000', '110', '小港區'),
(13, '64', '000', '120', '鳳山區'),
(14, '64', '000', '130', '林園區'),
(15, '64', '000', '140', '大寮區'),
(16, '64', '000', '150', '大樹區'),
(17, '64', '000', '160', '大社區'),
(18, '64', '000', '170', '仁武區'),
(19, '64', '000', '180', '鳥松區'),
(20, '64', '000', '190', '岡山區'),
(21, '64', '000', '200', '橋頭區'),
(22, '64', '000', '210', '燕巢區'),
(23, '64', '000', '220', '田寮區'),
(24, '64', '000', '230', '阿蓮區'),
(25, '64', '000', '240', '路竹區'),
(26, '64', '000', '250', '湖內區'),
(27, '64', '000', '260', '茄萣區'),
(28, '64', '000', '270', '永安區'),
(29, '64', '000', '280', '彌陀區'),
(30, '64', '000', '290', '梓官區'),
(31, '64', '000', '300', '旗山區'),
(32, '64', '000', '310', '美濃區'),
(33, '64', '000', '320', '六龜區'),
(34, '64', '000', '330', '甲仙區'),
(35, '64', '000', '340', '杉林區'),
(36, '64', '000', '350', '內門區'),
(37, '64', '000', '360', '茂林區'),
(38, '64', '000', '370', '桃源區'),
(39, '64', '000', '380', '那瑪夏區');

-- --------------------------------------------------------

--
-- 資料表結構 `st`
--

CREATE TABLE `st` (
  `id` int(10) UNSIGNED NOT NULL,
  `st_time` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

 

-- --------------------------------------------------------

--
-- 資料表結構 `running`
--

CREATE TABLE `running` (
  `id` int(10) UNSIGNED NOT NULL,
  `prvCode` varchar(2) NOT NULL,
  `cityCode` varchar(3) NOT NULL,
  `deptCode` varchar(3) NOT NULL,
  `tboxNo` int(10) UNSIGNED NOT NULL,
  `candNo1` int(10) UNSIGNED NOT NULL,
  `tks1` int(10) UNSIGNED NOT NULL,
  `candVictor1` varchar(10) NOT NULL,
  `tksRate1` double NOT NULL,
  `candNo2` int(10) UNSIGNED NOT NULL,
  `tks2` int(10) UNSIGNED NOT NULL,
  `candVictor2` varchar(10) NOT NULL,
  `tksRate2` double NOT NULL,
  `candNo3` int(10) UNSIGNED NOT NULL,
  `tks3` int(10) UNSIGNED NOT NULL,
  `candVictor3` varchar(10) NOT NULL,
  `tksRate3` double NOT NULL,
  `prof1` int(10) UNSIGNED NOT NULL,
  `prof2` int(10) UNSIGNED NOT NULL,
  `prof3` int(10) UNSIGNED NOT NULL,
  `prof4` int(10) UNSIGNED NOT NULL,
  `prof5` int(10) UNSIGNED NOT NULL,
  `prof6` int(10) UNSIGNED NOT NULL,
  `prof7` int(10) UNSIGNED NOT NULL,
  `profRate` double NOT NULL,
  `deptTot` int(10) UNSIGNED NOT NULL,
  `deptRcv` int(10) UNSIGNED NOT NULL,
  `tboxTot` int(10) UNSIGNED NOT NULL,
  `tboxRcv` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

 

-- --------------------------------------------------------

--
-- 資料表結構 `final`
--

CREATE TABLE `final` (
  `id` int(10) UNSIGNED NOT NULL,
  `prvCode` varchar(2) NOT NULL,
  `cityCode` varchar(3) NOT NULL,
  `deptCode` varchar(3) NOT NULL,
  `tboxNo` int(10) UNSIGNED NOT NULL,
  `candNo1` int(10) UNSIGNED NOT NULL,
  `tks1` int(10) UNSIGNED NOT NULL,
  `candVictor1` varchar(10) NOT NULL,
  `tksRate1` double NOT NULL,
  `candNo2` int(10) UNSIGNED NOT NULL,
  `tks2` int(10) UNSIGNED NOT NULL,
  `candVictor2` varchar(10) NOT NULL,
  `tksRate2` double NOT NULL,
  `candNo3` int(10) UNSIGNED NOT NULL,
  `tks3` int(10) UNSIGNED NOT NULL,
  `candVictor3` varchar(10) NOT NULL,
  `tksRate3` double NOT NULL,
  `prof1` int(10) UNSIGNED NOT NULL,
  `prof2` int(10) UNSIGNED NOT NULL,
  `prof3` int(10) UNSIGNED NOT NULL,
  `prof4` int(10) UNSIGNED NOT NULL,
  `prof5` int(10) UNSIGNED NOT NULL,
  `prof6` int(10) UNSIGNED NOT NULL,
  `prof7` int(10) UNSIGNED NOT NULL,
  `profRate` double NOT NULL,
  `deptTot` int(10) UNSIGNED NOT NULL,
  `deptRcv` int(10) UNSIGNED NOT NULL,
  `tboxTot` int(10) UNSIGNED NOT NULL,
  `tboxRcv` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

arrow
arrow
    文章標籤
    python mysql 程式設計
    全站熱搜

    richkan 發表在 痞客邦 留言(0) 人氣()