34,838
社区成员




create table #tmptable(rq datetime)
go
insert #tmptable
values('2015-08-20 10:00:00'),
('2015-08-20 10:00:02'),
('2015-08-20 10:00:05'),
('2015-08-20 10:00:09'),
('2015-08-20 10:02:01'),
('2015-08-20 10:02:05'),
('2015-08-20 10:03:00'),
('2015-08-20 10:03:03'),
('2015-08-20 10:04:00')
create table #tmptable(rq datetime)
go
insert #tmptable
values('2015-08-20 10:00:00'),
('2015-08-20 10:00:02'),
('2015-08-20 10:00:05'),
('2015-08-20 10:00:09'),
('2015-08-20 10:02:01'),
('2015-08-20 10:02:05'),
('2015-08-20 10:03:00'),
('2015-08-20 10:03:03'),
('2015-08-20 10:04:00')
select * from #tmptable where right(convert(varchar(10),rq,108),2)='00'
-- 可以考虑一下 datepart 函数
--
select * from test where DATEPART(SECOND ,rq) = 0
go