摘要:
--由父项递归下级 with cte(id,parentid,text) as (--父项 select id,parentid,text from treeview where parentid = 450 union all --递归结果集中的下级 select t.id,t.parentid,t.text from treeview as t inner join cte ... 阅读全文
随笔档案-2019年08月
Sqlserver查询每组数据中最大的一条数据
2019-08-01 11:12 by NO.27, 4836 阅读, 收藏,
摘要:
select * from ( SELECT ROW_NUMBER() over (PARTITION By name order by val) as rowId,tb_test.* FROM tb_test ) t where rowid <= 1 阅读全文
浙公网安备 33010602011771号