我的数据结构:CREATE TABLE [class] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[parentId] [int] NULL ,
[className] [char] (10) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO
首先如何显示呀
我只写到这儿啦
ResultSet rs = null;
String sql="",parentId="0";
sql="select * from [class] where [class].[parentId]=0 order by [class].[id] desc";
rs=conn.executeQuery(sql); 
while(rs.next()){
parentId=rs.getString("id");
//sql="select * from [class] where [class].[parentId]="+parentId+" order by [class].[id] desc";
out.print("<li>"+rs.getString("className")+"");
}
如何写一个递归函数全部显示呀