INSERT INTO [B]([col1], [col2])
select [col1], [col2] from [A]

解决方案 »

  1.   

    select indetity(int,1,1) as 列名,* into B from A
      

  2.   

    CREATE TABLE [B] (
    [ID] [int] IDENTITY (1, 1) NOT NULL ,
    [col1] [int] NOT NULL ,
    [col2] [char] (32) COLLATE Chinese_PRC_CI_AS NOT NULL ,
    CONSTRAINT [PK_access] PRIMARY KEY  CLUSTERED 
    (
    [Access_ID]
    )  ON [PRIMARY] 
    ) ON [PRIMARY]
    GO
    INSERT INTO [B]([col1], [col2])
    select [col1], [col2] from [A]
      

  3.   

    select indetity(int,1,1) as id,* into B from A
      

  4.   

    indetity
    是不可识别的函数名