SQL 常用语句
时间:2021-07-01 10:21:17
帮助过:3人阅读
SELECT * FROM UsersWHERE datepart(week,AddDate)=datepart(week,getdate())-1
--上月数据 SELECT * FROM Users WHERE datediff(month,AddDate,getdate())=1
--将为null值转换成0
SELECT convert(int,isnull(u.EmpiricalValue,0)) FROM Users
SQL 常用语句
标签: