22,209
社区成员
发帖
与我相关
我的任务
分享
select * from EventLogView where 1<>2 and (EventTag>=100 and EventTag<=130 or (EventTag in (208,209))) order by ID asc
create table test(id int identity)
go
insert into test default values
go 30
select * from test where 1 <2 and (id >= 10 and id <= 15 or (id in(24,25)))
go
drop table test
go
id
10
11
12
13
14
15
24
25
-- 你的库中,根本就没有这两个值 208,209 。
create table test(id int identity)
go
insert into test default values
go 30
select * from test where 1 <2 and (id between 10 and 15 or id in(24,25))
go
drop table test
go
id
-----------
10
11
12
13
14
15
24
25
(8 行受影响)
(EventTag>=100 and EventTag<=130)
这段括起来试试