现在加拉个WHERE条件:
select distinct * into #t from (select * from test where t1='1') a---正确
truncate table (select * from test where t1='1') a ---报错,为何
insert test select * from #t
drop table #t
----------------------------------------
这个A为什么要删除,那只是一个别名而已,不用删除的。
truncate table (select * from test where t1='1') a ---报错,为何
这句可以去掉。
现在加拉个WHERE条件:
select distinct * into #t from (select * from test where t1='1') a---正确
truncate table (select * from test where t1='1') a ---报错,为何
insert test select * from #t
drop table #t