时间:2021-07-01 10:21:17 帮助过:62人阅读
--读取表变量的数据
insert into #temp select c.ObjectText,count(*) as CountNum from Sip_HiddenDisposalInfo a
inner join Sc_InspectionContent b
on a.Sc_InspectionContentID=b.Sc_InspectionContentId inner join Sc_InspectionItem c
on b.Sc_InspectionItemId=c.Sc_InspectionItemId where c.CheckLevel=2
and a.SiteID in (select * from @aaa)
and a.CreateTime>=@firtTime and a.CreateTime<=@lastTime group by c.ObjectText
sql 表变量的使用
标签:create rtt content table join sql pos sel evel