select Field_Content,ID*1 as ID,[index]=identity(int,1,1) into #temp from user_Pro where categoryid=" + id+" order by indexid desc; select * from #temp; drop table #temp";

来源:学生作业帮助网 编辑:作业帮 时间:2024/07/17 18:47:24
select Field_Content,ID*1 as ID,[index]=identity(int,1,1) into #temp from user_Pro where categoryid=
xՑN@_75? ;`F:QvDZ0pbğX5Le:Sx g`w3{܉I8o*lkEM% G!k@:"g @:zTn4X3qA4K58=C>kCJ` F+A @!,+cͩXboDOW޸{_Ʊ:ﻬ}ٹ3NݥxŅìVZmxq$.0]G1CP `nK4j&6zݟʫdrѝisIc FAGHUnyQYyje0s

select Field_Content,ID*1 as ID,[index]=identity(int,1,1) into #temp from user_Pro where categoryid=" + id+" order by indexid desc; select * from #temp; drop table #temp";
select Field_Content,ID*1 as ID,[index]=identity(int,1,1) into #temp from user_Pro where categoryid=" + id+" order by indexid desc; select * from #temp; drop table #temp";

select Field_Content,ID*1 as ID,[index]=identity(int,1,1) into #temp from user_Pro where categoryid=" + id+" order by indexid desc; select * from #temp; drop table #temp";
一段sql语句是存储过程中的一个部分.
选择 在 user_pro 表中 类别id=id 的 字段内容 ID 检索 ,并把结果按照检索id 的顺序存到临时表#temp 中
从临时表将所有的字段的内容读出,并将临时表删除