Query comparing dates in SQL

前端 未结 7 1861
野趣味
野趣味 2020-11-28 10:18

I have a table with dates that all happened in the month November. I wrote this query

select id,numbers_from,created_date,amount_numbers,SMS_text 
from Tes         


        
7条回答
  •  情歌与酒
    2020-11-28 10:42

    Try to use "#" before and after of the date and be sure of your system date format. maybe "YYYYMMDD O YYYY-MM-DD O MM-DD-YYYY O USING '/ O \' "

    Ex:

     select id,numbers_from,created_date,amount_numbers,SMS_text 
     from Test_Table
     where 
     created_date <= #2013-04-12#
    

提交回复
热议问题