SQL语句的基本参数





create database benet #创建数据库,名为benet use benet #打开benet数据库 create table A1 #创建表为A1 ( 编号 int identity(1,1) not null, #identity(1,1)表示该列为标识列,种子和增量值都是1 学号 int primary key not null, #primary key 表示该列为主键列 姓名 nvarchar(20) not null, #not null 表示不允许为空 身 份 证号 nvarchar(18) not null, 年龄 tinyint not null, 班级 int not null, 备注 nvarchar(1000) null, ) alter table A1 add 出生日期 datetime not null #表示往A1表中添加一个“出生日期”列 alter table A1 alter column 备注 nvarchar(2000) null #修改A1表中备注的参数 alter table A1 drop column 备注 #删除A1表中的“备注”列 drop table A1 #删除A1表 insert into B1 (学号,姓名,身 份 证号,年龄,班级,备注) values (2,'柳岩','110258198308282882',27,2,'英语科代表') #往B1表中插入柳岩的信息 update B1 set 备注='数学课代表' where 姓名='柳岩' #把B1表中柳岩的备注改为数学课代表 delete from B1 where 学号=2 #删除表中学号为2的记录
关于删除的语句
查询时所需要用到的运算符、通配符、逻辑运算符

