1:新建该数据类型
![](https://i-blog.csdnimg.cn/blog_migrate/8dc062b5a20b1d21f5525df2ff1d39c1.png)
CREATE TABLE `test` (
`name` int(8) NOT NULL,
`time_oper` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`name`,`time_oper`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
2:插入元素和显示效果
insert into collection_data.test VALUES(1, 20160202120212)
![](https://i-blog.csdnimg.cn/blog_migrate/07cc6fda9be0c0a57256d07849a7d0dd.png)
3:过滤该类型
SELECT * from clientindex.ad_open_screen where begin_time < '2016-02-10 01:00:00' and end_time > '2016-02-10 01:00:00'