CREATE TABLE sample (
`id` bigint(11) NOT NULL auto_increment COMMENT '自增ID',
`host_ip` int(11) NOT NULL DEFAULT 0 COMMENT '机器IP',
`host_port` int(11) NOT NULL DEFAULT 0 COMMENT '端口',
`user` varchar(64) NOT NULL DEFAULT '' COMMENT '用户名',
`fee` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '费用',
`fee2` decimal(6,4) NOT NULL DEFAULT 0.0000 COMMENT '费用',
`gen_date` date NOT NULL DEFAULT '1000-01-01' COMMENT '生成日期',
`gen_time` datetime NOT NULL DEFAULT '1000-01-01 00:00:00' COMMENT '生成时间',
`gen_timestamp` timestamp NOT NULL DEFAULT '1970-01-01 08:00:01' COMMENT '时间戳',
PRIMARY KEY (`id`),
KEY `idx_gtime` (`gen_time`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;