簡體   English   中英

在SQL中選擇特定日期之后的記錄

[英]Select records after specific date in SQL

我的數據庫中有一列名為“ begin_date”。 我試圖選擇begin_date大於特定日期的記錄。 我放

select * from Table_Name
where begin_date >= '1/1/2014'

但是,它返回錯誤消息“字符串到日期的轉換錯誤”。 我不確定如何修改查詢以使其正常工作? 謝謝!

嘗試使用ISO(8601)標准日期格式:

select *
from Table_Name
where begin_date >= '2014-01-01';
select * 
from table
where data >= '01/01/2014'

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM