SQL code: CREATE FUNCTION f_Cid(@ID int) RETURNS @t_Level TABLE(ID int,Level int) AS BEGIN DECLARE @Level int SET @Level=1 INSERT @t_Level SELECT @ID,@Level WHILE @@ROWCOUNT>0 BEGIN SET @Level=@Level+1 INSERT @t_Level SELECT a.ID,@Level from tb a,@t_Level b WHERE a.PID=b.ID AND b.Level=@Level-1 END RETURN END GO
ÏÈÉÏ´íÎó ÎÞ·¨Áª½ÓÊý¾Ý¿â java.sql.SQLException: Before start of result set at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910) at com.mysql.jdbc.ResultSet.checkRowPos(ResultSet.java: ......