MaxDown Asked:2022-08-02 19:23:07 +0800 CST2022-08-02 19:23:07 +0800 CST 2022-08-02 19:23:07 +0800 CST 拆分ms sql表数据 772 是否可以将一条线分成几条? (由于某种原因,没有创建表格,尽管格式上一切都是正确的) sql 1 个回答 Voted Best Answer Sergey Moiseenko 2022-08-02T21:01:16+08:002022-08-02T21:01:16+08:00 with t as (select * from (values(1,'A',3,1),(2,'B',2,1)) x(id,name,count,cnt)) ,rec as (select * from t union all select 1,name,count, cnt+1 cnt from rec where cnt<count ) select row_number() over(order by name) id, name, 1 count from rec ;
1 个回答