SQLite equivalent to ISNULL(), NVL(), IFNULL() or COALESCE()

前端 未结 6 959
夕颜
夕颜 2020-11-30 00:56

I\'d like to avoid having many checks like the following in my code:

myObj.someStringField = rdr.IsDBNull(someOrdinal) 
                            ? string.         


        
6条回答
  •  庸人自扰
    2020-11-30 01:40

    IFNULL, see here: http://www.sqlite.org/lang_corefunc.html#ifnull

    no brackets around the function

提交回复
热议问题