看板 Database 關於我們 聯絡資訊
(針對 SQL 語言的問題,用這個標題。請用 Ctrl+Y 砍掉這行) 資料庫名稱:sql server 資料庫版本:2016 內容/問題描述: 我想取得以今年為基準的前後ex:3年sql語法請問要如何下? 格式如下: value caption =============================== 2015 2015年 2016 2016年 2017 2017年 2018 2018年 2019 2019年 2020 2020年 2021 2021年 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 211.72.118.61 ※ 文章網址: https://www.ptt.cc/bbs/Database/M.1516755370.A.FB4.html ※ 編輯: oherman (211.72.118.61), 01/24/2018 09:05:49
Duncan101: where value between year(getdate())-3 and year(getd 03/16 07:57
Duncan101: ate())+3,試試看 03/16 07:57