判断一个值在是否在1-6月份出现过,如果没有,则取这个值。要怎么写。
select x from table where x not exist (select x from table where yuefen in (1,2,3,4,5,6)
select * from table where 值 not in (select 值所对应的字段 from table where time between 1 and 6 没有查到记录就是这个值了
select * from table where value not in(select * from table where month in(1,2,3,4,5,6))
select
x
from table
where x
not exist (select
x
from table
where yuefen
in (1,2,3,4,5,6)
select x from table where x not exist (select x from table where yuefen in (1,2,3,4,5,6)