SQL排除满足同时多个条件的记录行
查询的数据必须满足同时以下的条件:
fee_type <> crcfee
answer_type <> income
entrance_type <> PROJECT
SELECT * FROM dbo.FundsTypesAnswers
WHERE NOT (fee_type = 'crcfee' AND answer_type = 'income' AND entrance_type ='PROJECT')
查询的数据必须满足同时以下的条件:
fee_type <> crcfee
answer_type <> income
entrance_type <> PROJECT
SELECT * FROM dbo.FundsTypesAnswers
WHERE NOT (fee_type = 'crcfee' AND answer_type = 'income' AND entrance_type ='PROJECT')