1. 字符串函數應用
--從指定索引截取指定長度的字符串 SELECT substring('abcdefg',2,5) --獲取字符串中指定字符的索引(從1開始) select charindex(',','ab,cdefg') --實際應用中的語句 select proId,color,substring(FacePath,0,charindex(',',FacePath)) as FacePath from proselect where id=1000000
2. 日期函數應用
--獲取三個月前的時間 SELECT DATEADD(month, -3,getdate())