摘要:
有些表设计没有标识,没有主键,删除起来一直是个麻烦的事情,而CTE的运用却让这件事情变得简单。create table CreDelete ( id int identity(1,1), name varchar(10)
)
go
insert into CreDelete select '张三' as name
union all select '王2'
union all select '张三'
union all select '王2'
union all select '张1'
union all sele 阅读全文