Auto commit

This commit is contained in:
smallkun 2025-03-18 18:51:27 +08:00
parent f93fce1ea6
commit 721a9d8fb7

View File

@ -386,6 +386,30 @@ INSERT INTO Records (姓名, 记录) VALUES
![image-20250315230025538](https://yp.smallkun.cn/markdown/image-20250315230025538.png!compress)
```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
);
```
---