查詢當前月份web
select datename(month,getdate()) select datepart(month,getdate())
選取左邊的字符sql
select left('12345',2) from dummy
清除左邊的空格:spa
select ltrim(' aa bb')
清除右邊的空格:code
select rtrim(" ab cd ") from dummy
字符的重複打印orm
select replicate('ab',4)
再過89天后是哪一天 ci
select dateadd(day,89,getdate())
查看用戶id,用戶名get
select user_id(),user