表结构
CREATE TABLE [staff] (
[id] [varchar](50) NOT NUL L,
[name] [varchar](50) NOT NULL,
[password] [varchar](50) NULL,
[roleid] [varchar](50) NULL,
[account] [varchar](50) NULL,
[tel] [varchar](50) NULL,
)
增加列 : alter table staff
add sex varchar(50)
修改列: alter table staff
alter column sex varchar(5) not null
创建主键 : alter table staff
add constraint pk_id primary key(id)
删除主键: alter table staff
drop constraint pk_id
创建外键: alter table staff
add constraint fk_roleid foreign key(roleid) references role(id)
删除外键:alter table staff
drop constraint fk_roleid