8.20
/music``studentSELECT * FROM student; INSERT INTO student(id,NAME,PASSWORD) VALUES(5,'123','zhou'); UPDATE student SET name='zheng' WHERE id=1 SELECT FROM student where id=3;
music
employee`CREATE TABLE employee(
id INT,
NAME VARCHAR(20),
gender BOOL,
birthday DATE,
Entry_date DATE,
job VARCHAR(20),
salary FLOAT,
RESUME TEXT
);
INSERT INTO employee(id,NAME,gender,birthday,Entry_date,job,Salary)
VALUES (3,‘zheng’,‘1’,‘2000-06-18’,‘2000-06-18’,‘didi’,100.00);
INSERT INTO employee(id,NAME,gender,birthday,Entry_date,job,Salary)
VALUES(‘chen’,‘1’,‘2019-08-20’,‘2019-08-20’,‘总裁’,10000); student``student``student
select * from stu where sid not in(1,2,3)
查询学号不是1,2,3的记录
SELECT * FROM stu WHERE age is null
查询年龄为null的记录
SELECT * FROM stu WHERE age>20 and age<40
查询年龄在20到40之间的学生记录
SELECT * FROM stu WHERE gender<>“男”
查询性别非男的学生记录
SELECT * FROM stu WHERE sname<>“null”
查询姓名不为null的学生记录
select count(*) as a from stu
select avg(age) from stu
select * from stu limit