| 发表于:2007-07-11 13:49:183楼 得分:10 |
create proc sp_ins as begin if object_id( '#tmp ') is not null drop table #tmp select date, volume, 't1 ' as type into #tmp from table1 insert #tmp select date, volume, 't2 ' from table2 union all select date, volume, 't3 ' from table3 union all select date, volume, 't4 ' from table4 end | | |
|