1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| GETDATE()
YEAR(GETDATE())
DATEDIFF(dateformat, startdate, enddate)
DATEADD(Unit of time, value, date)
NANOSECOND, MICROSECOND, MILLISECOND, SECOND, MINUTE, HOUR, WEEKDAY, WEEK, DAY, DAYOFYEAR, MONTH, QUARTER, YEAR
select * from User where CreatedDate between '2016-09-26' and '2016-09-27'
select * from User order by column desc
select UserCode, Count(*) from User group by UserCode
SELECT TOP (10) * from User
|