--EXCEPT 版SELECT seq
FROM Sequence
WHERE seq BETWEEN1AND12EXCEPTSELECT seq FROM SeqTbl;--NOT IN 版SELECT seq
FROM Sequence
WHERE seq BETWEEN1AND12AND seq NOTIN(SELECT seq FROM SeqTbl);-- 动态地指定连续编号范围的SQL语句SELECT seq
FROM Sequence
WHERE seq BETWEEN(SELECTMIN(seq)FROM SeqTbl)AND(SELECTMAX(seq)FROM SeqTbl)EXCEPTSELECT seq FROM SeqTbl;/**这么做性能会有所下降但是通过扩展BETWEEN谓词的参数,我们可以动态的指定目标表的最大值和最小值
这种写法在查询上限和下限未必固定的表时非常方便
两个子查询没有相关性,而且只会执行一次
如果在“seq”列上建立索引,那么极值函数的运行可以变得更快速**/