insert into tb_Customer(Name) select Name2 from TB2

解决方案 »

  1.   

    insert into tb_Customer (name) select name from othertable
    insert into othertalbe select name from tablename where id =(select max(id) from tablename)
      

  2.   

    insert into tb_Customer (name) 
    values('abd')insert into othertalbe 
    select name from tablename where id =@@identity
      

  3.   

    哦,第一个问题是我的失误,呵呵,我还以为我的语法错了,原来是我自己的笔误。
    那第二个问题,用
    insert into othertalbe select name from tablename where id =(select max(id) from tablename)恐怕不是很妥当吧!
      

  4.   

    insert into othertalbe 
    select name from tablename where id =@@identity
    能用吗?
      

  5.   

    关于第二问:可一写个触发器:
    create trigger tri_name on SourceTable for insert
    as
    insert into DesTable  select * from inserted