合聚咖

合聚咖

SQl 查询:输入教师名,显示该系教师姓名,年龄,系别,职称 考试T.T

admin

考试T.T是什么意思啊?

--创建表

create table teacher

(

tname varchar(20) not null, --教师名

tage int not null, --年龄

tspe varchar(10) not null, --系别

tjob varchar(20) not null --工作职称

)

--查询

select t.tname, t.age, t.spe, t.tjob from teacher t where t.tname = '教师名条件'

--修改

update teacher t set t.tjob = '要改的职称' where t.name = '教师名条件'

--删除

delete from teacher where 你的条件

--添加

insert into teacher values('教师名', '年龄', '系别', '工作职称')

这样行了吗?