数据库名 student 表名exam 列名id(主键自增),name,chinese,math,english
1.添加数据
insert into exam values(null,‘关羽’,85,76,70);
2.删除数据
DELETE from exam where name=‘关羽’;
3.修改数据
UPDATE exam set name=‘刘备’
4.查询表
select * from exam
5.删除表
DELETE from exam
6.根据条件查询
SELECT * from exam where english BETWEEN 80 and 90
SELECT * from exam where math=89 or math=75 or math=91
SELECT * from exam where name=‘刘备’
7.模糊查询(姓名中以刘开头的)
SELECT * from exam where name like ‘刘%’
8.查询数学分>80并且语文分>80的同学。
SELECT * from exam where math>80 and chinese>80
9.查询数学分>80 或者 语文分>80的同学。
SELECT * from exam where chinese>80 or math>80