Auto commit
This commit is contained in:
parent
f93fce1ea6
commit
721a9d8fb7
@ -386,6 +386,30 @@ INSERT INTO Records (姓名, 记录) VALUES
|
||||

|
||||
|
||||
```sql
|
||||
#3
|
||||
UPDATE score s
|
||||
SET s.`语文` = 88
|
||||
WHERE s.`姓名` = '张三';
|
||||
|
||||
#4
|
||||
SELECT AVG(s.`英语`), AVG(s.`数学`), AVG(s.`语文`)
|
||||
FROM classes c, score s
|
||||
WHERE c.`姓名` = s.`姓名` AND c.`班级` = 1 AND c.`专业` = '计算机维护';
|
||||
|
||||
#5
|
||||
SELECT *
|
||||
FROM score s
|
||||
WHERE s.`数学` < 60 OR s.`英语` < 60 OR s.`语文` < 60;
|
||||
|
||||
#6
|
||||
SELECT *
|
||||
FROM score s
|
||||
WHERE s.`姓名` IN (
|
||||
SELECT r.`姓名`
|
||||
FROM records r
|
||||
GROUP BY r.`姓名`
|
||||
HAVING COUNT(*) > 2
|
||||
);
|
||||
```
|
||||
|
||||
---
|
||||
|
Loading…
x
Reference in New Issue
Block a user