CREATE TABLE `student` ( `id` BIGINT PRIMARY KEY auto_increment , `name` VARCHAR (25), `sex` TINYINT (2) , `phone` VARCHAR (25), `role` INT (2), `score` INT(4))/**/INSERT INTO `student` VALUES (1,'zhangsan',2,'113837689458',1,54);INSERT INTO `student` VALUES (2,'lisi',2,'18537689458',2,90);INSERT INTO `student` VALUES (3,'wangwu',1,'15937689458',3,94);INSERT INTO `student` VALUES (4,'zhaoliu',2,'13037689458',3,82);UPDATE `student` set student.phone = '18850553636' WHERE student.`name`= 'lisi'/*查询不及格*/SELECT * FROM student WHERE student.score<60;SELECT * FROM `student` WHERE student.`name` LIKE 'z%';SELECT * FROM student WHERE student.role =1 OR role = 3 ;
SELECT * FROM student WHERE student.role in(1,3) ;
DELETE FROM `student` WHERE role = 1; DELETE FROM `student`