数据如下2009-05-27 00:03:00.000 27
2009-05-27 00:03:01.000 23
2009-05-27 00:03:02.000 43
2009-05-27 00:03:03.000 34
.
.
.2009-05-27 00:04:00.000 28
2009-05-27 00:04:01.000 23
.
.2009-05-27 00:05:00.000 54
.
.要求查询出所有秒数为00的数据(如:2009-05-27 00:05:00.000 54) select H_DataTime,s_1 from HistoryLog where 条件怎么写??
2009-05-27 00:03:01.000 23
2009-05-27 00:03:02.000 43
2009-05-27 00:03:03.000 34
.
.
.2009-05-27 00:04:00.000 28
2009-05-27 00:04:01.000 23
.
.2009-05-27 00:05:00.000 54
.
.要求查询出所有秒数为00的数据(如:2009-05-27 00:05:00.000 54) select H_DataTime,s_1 from HistoryLog where 条件怎么写??
set @t=getdate()
select @t
select datepart(ss,@t)/*
------------------------------------------------------
2009-05-27 17:40:30.327(所影响的行数为 1 行)
-----------
30(所影响的行数为 1 行)*/