sqlite修改表名或修改主鍵語法
阿新 • • 發佈:2017-08-03
res int ins address tel rom har sql create
Begin Transaction;
Create TABLE MAIN.[Temp_970706128](
[cltcode] varchar(20) NOT NULL
,[cltname] varchar(50)
,[pycode] varchar(20)
,[wbcode] varchar(20)
,[address] varchar(100)
,[linkman] varchar(20)
,[tel] varchar(20)
,[memo] varhcar(50)
,[state] int
, Primary Key(cltcode)
);
Insert Into MAIN.[Temp_970706128] ([cltcode],[cltname],[pycode],[wbcode],[address],[linkman],[tel],[memo],[state])
Select [cltcode],[cltname],[pycode],[wbcode],[address],[linkman],[tel],[memo],[state] From MAIN.[sCltGeneral];
Drop Table MAIN.[sCltGeneral];
Alter Table MAIN.[Temp_970706128] Rename To [sCltGeneral];
Commit Transaction;
sqlite修改表名或修改主鍵語法