当前位置:Gxlcms > 数据库问题 > Sql Server 常用语句

Sql Server 常用语句

时间:2021-07-01 10:21:17 帮助过:6人阅读

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 常用语句

标签:rds   com   sql   varchar   select   var   buffer   sql 语句   get   

人气教程排行