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/04/24 22:31:22

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";
选择字段的内容,ID * 1作为ID,[指数]=身份(int,1,1)到#临时从用户pro,categoryid = " + ID +“order by desc indexid;select * from #临时;删除表# temp”;

一段sql语句是存储过程中的一个部分。
选择 在 user_pro 表中 类别id=id 的 字段内容 ID 检索 ,并把结果按照检索id 的顺序存到临时表#temp 中
从临时表将所有的字段的内容读出,并将临时表删除可以一段一段解释下吗?select Field_Content,ID*1 as ID,[index]=identity(int,1,1) into #temp ...

全部展开

一段sql语句是存储过程中的一个部分。
选择 在 user_pro 表中 类别id=id 的 字段内容 ID 检索 ,并把结果按照检索id 的顺序存到临时表#temp 中
从临时表将所有的字段的内容读出,并将临时表删除

收起