如 select a.[name], b.* into ##table1 from b inner join a on b.id = a.id

解决方案 »

  1.   

    用临时表建立一个正式表:
    select * into temp from ##table1 where 1 = 2
    分析这个正式表temp的结构:
    http://expert.csdn.net/Expert/topic/1667/1667935.xml?temp=.100857
      

  2.   

    然后将正式表temp删除:
    drop table temp
      

  3.   

    select d.name,a.name ,b.name ,a.length, a.isnullable from tempdb..syscolumns a, tempdb..systypes b,tempdb..sysobjects d where a.xtype=b.xusertype and a.id=d.id  where d.name='##你的表名'
      

  4.   

    select d.name,a.name ,b.name ,a.length, a.isnullable from tempdb..syscolumns a, tempdb..systypes b,tempdb..sysobjects d where a.xtype=b.xusertype and a.id=d.id  and d.name='##你的表名'