--插入多条数据
insert into CCC(C_Id,C_Name)(newid(),select A_Name from AAA where A_Id not in
(select A_Id from BBB where B_DateTime='2009-09-03'))我想C_Id  插入的是全球唯一,  这样多条插入~ 老是报错。。 谁能指导我下~ 谢谢。

解决方案 »

  1.   

    要么全用value (a,b,c)形式要么
    insert ccc (C_Id,C_Name)select newid(),_Name from AAA 
      

  2.   

    格式应该是这样的
    insert into tb(a,b,c) select d,e,f from tb
    前后字段一一对应
      

  3.   

    insert into CCC(C_Id,C_Name) 
    select newid(),A_Name from AAA 
    where A_Id not in 
    (select A_Id from BBB where B_DateTime='2009-09-03')