select * into tmp from name1
alter table tmp add 其他 varchar(100)---增加

解决方案 »

  1.   

    select *,其它 into tmp from name1
      

  2.   

    select *,其它 into tmp from name1
    这种办法不行的。
    用alter table是可以的。可是还要用go
    可是只要有go,则后面的语句就不认前面的变量了。
    如何办呢?
      

  3.   

    select *,'其他' as 其他 into tmp from name1
    绝对可以,测试成功的!
      

  4.   

    select 编号,姓名,工资,0.0 as 其他 into tmp from name1
    这种办法是可以的,可是我认为不好,比如其他是一个数值型,这样就要给它放一个很大的数把它撑起来,可是这个数还必须要update,如果不被更新也要更新成0,我认为这是不太好的办法,期待好的办法出现。
    谢谢。
      

  5.   

    select sid=identity(int,1,1),* into tmp from name1
      

  6.   

    添加个序号
    select sid=identity(int,1,1),* into tmp from name1