首页 > 数据库技术 > 详细

Sql Server 常用语句

时间:2018-12-14 12:02:45      阅读:127      评论:0      收藏:0      [点我收藏+]

AND DateDiff(dd, convert(varchar(50), ‘2018-11-28‘) , DataDate) >= 0
AND DateDiff(dd, convert(varchar(50), ‘2018-11-28‘) , DataDate) <= 0

SELECT Ceiling(rand() * 1000)

select Convert(decimal(18, 3), ‘5.26415‘)
select Convert(Varchar,GetDate(),120)
select Convert(Varchar,GetDate(),23)

dbcc dropcleanbuffers
dbcc freeproccache
set statistics io on
go
--Sql 语句
set statistics io off
go

--自连接
select * from OutcomeRecords as a
where a.DateOutcome in
( select Max(DateOutcome) from OutcomeRecords as b where a.PatientID = b.PatientID and b.DelMark = ‘0‘ );

Sql Server 常用语句

原文:https://www.cnblogs.com/kikyoqiang/p/10118228.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!