T-SQL Query Returning Items It Shouldn't Be

前端 未结 5 892
遥遥无期
遥遥无期 2021-01-21 17:15

Here\'s the scenario. The column in question is called \'datein\' and it\'s type is \'datetime\'. I have three rows with the value of \'2009-10-01 00:00:00.000\' for \'datein\

5条回答
  •  别那么骄傲
    2021-01-21 17:56

    The safe way to write these queries is as follows:

    SELECT  *
    FROM    t_call AS tc
    WHERE   tc.datein >= '2009-09-30T00:00:00.000'
            AND tc.datein < '2009-10-01T00:00:00.000''
    

提交回复
热议问题