摘要:
declare c cursor fast_forward/* read only forward noly*/ for --申明路由 select xx,xxx,xx from tabname; open c --打开路由 fetch next [ [Next|prior|Frist|Last|Absoute n|Relative n ] from c into @xxxx,@xx... 阅读全文
摘要:
--使用ROW_NUMBER()或rant()[如同分数同名次] 函数 select t.Subject,t.Amount,t.Name,t.Age ,t.* from ( select ROW_NUMBER() over(partition by i.Subject order by i.Amou 阅读全文
摘要:
--向下递归查询 with temp (FolderName,id,ParentID) as( select a.FolderName,id,ParentID from NC_FolderInFo a where ParentID=105 union all select m.FolderName,m.id,m.ParentID from NC_FolderInFo as m in... 阅读全文