其实就是from表时,可以插入到多个表. sql语句的模板如下: from history insert overwrite sales select * where actino='purchased' inesrt overwrite credits select * where action = 'returened';…
SQL SERVER 小技巧(不用exec实现in()的功能) declare @x varchar(20) SET @x='1,2,3' SELECT @x select * from data0001 where charindex(','+ltrim(rkey)+',',','+@x+',')>0 --====================== SQL SERVER 小技巧(多行数据转字符串a,b,c...的写法) declare @Colstr varchar(max) selec…
with list_numbers as ( select Name, AuthorOrTime, Url, Price, EstimatePrice, Size, Category, ROW_NUMBER() over (order by Name, AuthorOrTime, Url, Price, EstimatePrice, Size, Category) as 'rownumber' from Arts ) delete list_numbers where rownumber not…