|
主题:[求助]SQL语句的问题求助官方 [收藏主题] | 转到: |
数据库一直占CPU100%,换成SQL的也不行。 检测到以下SQL有问题,但我找自定义SQL没有找到,请帮助。 1、 Select ID,Title,Tid,ReadPoint,InfoPurview,Fname,Changes,AddDate,Popular,ChannelID,hits,username From (select ID,Title,Tid,ReadPoint,InfoPurview,Fname,Changes,AddDate,Popular,1 as ChannelID,hits,Inputer As username From KS_Article Where DelTF=0 And Verific=1 And keywords like ''%儿科学%'' Union All select ID,Title,Tid,ReadPoint,InfoPurview,Fname,0 as Changes,AddDate,Popular,3 as ChannelID,Hits,Inputer As username From KS_DownLoad Where DelTF=0 And Verific=1 And keywords like ''%儿科学%'' Union All select ID,Title,Tid,0 as ReadPoint,0 as InfoPurview,Fname,0 as Changes,AddDate,Popular,5 as ChannelID,Hits,Inputer As username From KS_Product Where DelTF=0 And Verific=1 And keywords like ''%儿科学%'' Union All select ID,Title,Tid,ReadPoint,InfoPurview,Fname,Changes,AddDate,Popular,111 as ChannelID,hits,Inputer As username From KS_U_esf Where DelTF=0 And Verific=1 And keywords like ''%儿科学%'') a ORDER BY ADDDATE DESC,ID Asc 2、 Select ID,Tid,Title,ChannelID,InfoID,Intro,AddDate,Fname From KS_ItemInfo Where Verific=1 and deltf=0 And (Title like ''%瀛ょ%'' or Title like ''%ょ嫭%'' or Title like ''%嫭鐥%'' or Title like ''%鐥囧%'' or Title like ''%囧効%'' or Title like ''%効绔%'' or Title like ''%绔ヨ%'' or Title like ''%ヨ%'' or Title like ''%涓%'' or Title like ''%涓鸿%'' or Title like ''%鸿瘎%'' or Title like ''%瘎瀹%'' or Title like ''%瀹氶%'' or Title like ''%氶噺%'' or Title like ''%噺琛%'' or Title like ''%琛s%'' or Title like ''%st%'' or Title like ''%ty%'' or Title like ''%yp%'' or Title like ''%pe%'' or Title like ''%e=%'' or Title like ''%=0%'') Order by ID Desc 3、 SELECT TOP 1 I.ChannelID,I.InfoID as ID,I.Title,I.Tid,I.Intro,I.PhotoUrl,I.AddDate,I.Inputer,I.Popular,I.Fname,I.Hits FROM [KS_ItemInfo] I Inner Join KS_Channel C On I.ChannelID=C.ChannelID Where C.ChannelStatus=1 And I.Verific=1 And I.DelTF=0 And I.Tid In (Select ID From KS_Class Where DelTF=0 AND TS LIKE '%20109354559082%') And I.Recommend=1 And I.Slide=1 And I.PhotoUrl<>'' ORDER BY I.IsTop Desc,id desc 4、 Select ID,Tid,Title,Intro,AddDate,Fname From KS_Article Where Verific=1 and deltf=0 And (Title like ''%北京%'' or Title like ''%京四%'' or Title like ''%四月%'' or Title like ''%月一%'' or Title like ''%一日%'' or Title like ''%日孤%'' or Title like ''%孤独%'' or Title like ''%独症%'' or Title like ''%症家%'' or Title like ''%家长%'' or Title like ''%长培%'' or Title like ''%培训%'') Order by ID Desc 5、 select Count(1) from KS_ItemInfo Where Verific=1 and deltf=0 And (Title like '%瀛ょ%' or Title like '%ょ嫭%' or Title like '%嫭鐥%' or Title like '%鐥囧%' or Title like '%囧効%' or Title like '%効绔%' or Title like '%绔ヨ%' or Title like '%ヨ%' or Title like '%涓%' or Title like '%涓鸿%' or Title like '%鸿瘎%' or Title like '%瘎瀹%' or Title like '%瀹氶%' or Title like '%氶噺%' or Title like '%噺琛%' or Title like '%琛s%' or Title like '%st%' or Title like '%ty%' or Title like '%yp%' or Title like '%pe%' or Title like '%e=%' or Title like '%=0%') 我自定义的SQL中没有语句,是系统中的吗?请帮助。 |
|
支持(0) | 反对(0) 顶端 底部 |
支持(0) | 反对(0) 顶端 底部 |
<上一主题 | 下一主题 > |