--处理file与folder中的order -- 声明变量 DECLARE @fileid AS INT, @folderid AS INT, @order AS INT, @oldFolderId AS INT, @orderCursor AS INT; -- 声明游标 DECLARE C_FILE CURSOR FAST_FORWARD FOR SELECT Id,FolderID,[ORDER] FROM FILES where [ORDER]=0 ORDER BY FolderId,N…