sql sever基本命令
创建表: create table stu_info( id int identity(1,1) not null primary key clustered, name char(10) not null, score numeric not null )
新建主键: create table stu_info( id int identity(1,1) not null, name char(10) not null ) alter table stu_info add constraint pk_id primary key cluster (id)
新建表字段 alter table stu_info add sex char(10) not null 删除表字段 alter table stu_infor drop column score 插入数据 insert into stu_info1 (name,score) values('a1',10) 更新数据 update stu_info1 set name='a2' where id =1 删除数据 delete stu_info1 where name='a1'
查询数据
select * from stu_info1
创建索引以及删除 create index stu_index on stu_info(id) create unique stu_index on stu_info(id) drop index stu_index on stu_info
SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

更多精彩