输入banner图图片脚本导航/分类

sql 表变量的使用

select Com_SiteGroupID from Com_SiteGroup where Com_StructureID =@whereId
union all
select a.Com_SiteBasicID from Com_SiteBasic a inner join Com_SiteGroup b on
a.Com_SiteGroupID=b.Com_SiteGroupID where b.Com_StructureID=@whereId

--读取表变量的数据

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