我有以下结果集:
FieldTypeID Level
1 0
2 0
2 1
3 0
从这个集合中我想选择以下行:
FieldTypeID Level
1 0
2 1
3 0
简而言之,我想要做的是编写一个SQL条件,该条件将过滤掉FieldTypeID = 2
及其Level = 0
答案 0 :(得分:0)
SELECT FieldTypeID, Level FROM [table] WHERE FieldTypeID <> 2 OR Level <> 0
答案 1 :(得分:0)
select fieldtypeid,level
from [table]
WHERE fieldtypeid <> 2
OR level = 1
答案 2 :(得分:0)
select *
from your_table
where not(FieldTypeID = 2 and Level = 0)