函数:递归分类
来源:互联网 发布:javascript 打印堆栈 编辑:程序博客网 时间:2024/05/22 10:26
CREATE Function GetChild(@regid int)
Returns @Child Table(id int ,productClass varchar(50),pid int )
As
Begin
Insert @Child Select id,productClass,pid From productClass Where id=@regid
if exists(select id,productClass,pid from productClass Where pid=@regid)
begin
declare @id int
declare @productClass varchar(255)
declare @pid int
declare cursor1 cursor for
select id,productClass,pid from productClass where pid=@regid order by pid for read only
open cursor1
fetch cursor1 into @id,@productClass,@pid
while @@fetch_status=0
begin
insert @Child select * from GetChild(@id)
fetch cursor1 into @id,@productClass,@pid
end
close cursor1
deallocate cursor1
end
return
End
- 函数:递归分类
- 递归列出分类级别函数
- 利用函数递归实现无限分类
- 递归分类
- php递归函数使用以及无限级分类的使用
- 编写一个函数,递归遍历,实现无限分类(新浪)
- PHP递归函数 获取属于这个分类的所有子分类
- 无限递归产品分类
- 递归无限分类
- 无限递归产品分类
- 另一种递归分类
- 递归无限极分类
- 递归实现无线分类
- php 无限分类 递归
- 递归无限极分类
- 递归无限极分类
- PHP递归无限分类
- 地区/递归分类
- JAVASCRIPT use program
- OGRE step by step
- 四书之《论语》学习日记6
- emacs学习笔记
- 服务器控件的生命周期
- 函数:递归分类
- sql加密
- 关于visual studio 2005sp1安装问题
- 一个让QQ不能启动的脚本病毒
- 母版页的加载顺序
- 一个简单的QQ聊天代码
- 写了个使用QuickSilver发表饭否消息的脚本..
- 树节点的拖动
- 随便写写今天一些知识点.