alter table yourtable add constaints ConstaintName primarykey(columnNmae)or create table yourtable(column1 int primary key,....)
select IDENTITY(int,1, 1) as iid,* into #table1 from 产品表
CREATE TABLE table1 ( [id ]AUTOINCREMENT NOT NULL , [untid]CHAR(15) NOT NULL , [hostnumber] CHAR(20) NOT NULL , [clientnumbe]CHAR(20) NOT NULL , [totalaccount]CURRENCY NOT NULL , [accountunit]INTEGER NOT NULL , [begincall]DATETIME NOT NULL , [calltype]CHAR(10) NOT NULL, PRIMARY KEY([id]) )
into #table1
from 产品表
[id ]AUTOINCREMENT NOT NULL ,
[untid]CHAR(15) NOT NULL ,
[hostnumber] CHAR(20) NOT NULL ,
[clientnumbe]CHAR(20) NOT NULL ,
[totalaccount]CURRENCY NOT NULL ,
[accountunit]INTEGER NOT NULL ,
[begincall]DATETIME NOT NULL ,
[calltype]CHAR(10) NOT NULL,
PRIMARY KEY([id])
)