1.创建/删除表

-------------

创建表

create table MyUserTable

(

 UserID INTEGER CONSTRAINT MyPK PRIMARY KEY ,

 UserName Text,

 UserBirthday DATETIME

)

删除表

DROP TABLE myUserTalbe

2.创建/删除主键

---------------

创建主键

ALTER TABLE MyUserTable  ADD CONSTRAINT MyPK PRIMARY KEY(UserID)

ALTER TABLE MyUserTable  ADD CONSTRAINT MyPK PRIMARY KEY(UserID,UserName)

删除主键

ALTER TABLE MyUserTable Drop CONSTRAINT MyPK


3.增加/修改/删除栏位字段

--------------------------

增加栏位字段

ALTER TABLE MyUserTable

ADD COLUMN UserNotes Text(20)

修改栏位字段

ALTER TABLE MyUserTable

ALTER  COLUMN UserNotes char(100)

删除栏位字段

ALTER TABLE MyUserTable

DROP  COLUMN UserNotes