日期:2014-05-16 浏览次数:20456 次
if OBJECT_ID('#tempdb..#table1') is not null
drop table #table1
if OBJECT_ID('#tempdb..#table2') is not null
drop table #table2
select IDENTITY(int,1,1) id,* into #table1
from table1
select IDENTITY(int,1,1) id,* into #table2
from table2
select tcid,公司名称,a.性别,备注,listid,联系人姓名,单位,状态
from #table1 a
inner join #table2 b
on a.id = b.id