Firebird 条件函数 - jonney_wang - 博客园 (cnblogs.com)
1、iif IIF (<condition>, ResultT, ResultF)
示例:
select iif( sex = 'M', 'Sir', 'Madam' ) from Customers
SELECT FIRST 500 "ID","姓名",iif("year" is null,123,"year")
FROM "t1"
若为null则改为123
2、nullif NULLIF (<exp1>, <exp2>)
示例:
select avg( nullif(Weight, -1) ) from FatPeople
这个没测试出来怎么用