📅  最后修改于: 2022-03-11 15:05:26.079000             🧑  作者: Mango
Both options you find max as a subset and then exclude from main select
sql> SELECT MAX( col ) FROM table
WHERE col < ( SELECT MAX( col ) FROM table);
sql> SELECT MAX(col) FROM table
WHERE col NOT IN (SELECT MAX(col) FROM table);