Auto commit

This commit is contained in:
smallkun 2025-03-18 19:12:14 +08:00
parent 721a9d8fb7
commit 8b030d5a28

View File

@ -505,6 +505,35 @@ INSERT INTO book (bid, bname, bsortno, pressid) VALUES
(1, '红与黑', 11, 100),
(2, '幻城', 12, 102),
(3, '希腊神话', 13, 102);
#5
SELECT b.*
FROM book b, press p
WHERE p.pressid = b.pressid AND p.pressid = 100;
#6
SELECT b.*
FROM book b, press p
WHERE p.pressid = b.pressid AND p.pressname = '外研社';
#7
SELECT *
FROM sort s
WHERE s.scount > 100;
#8
SELECT p.*
FROM book b, press p
WHERE p.pressid = b.pressid
GROUP BY b.pressid
HAVING COUNT(*) = (
SELECT COUNT(*)
FROM book b, press p
WHERE p.pressid = b.pressid
GROUP BY b.pressid
ORDER BY COUNT(*) DESC
LIMIT 1
);
```
---