What is the Oracle equivalent of SQL Server's IsNull() function?

后端 未结 4 1652
醉话见心
醉话见心 2020-11-28 11:00

In SQL Server we can type IsNull() to determine if a field is null. Is there an equivalent function in PL/SQL?

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-28 11:20

    Instead of ISNULL(), use NVL().

    T-SQL:

    SELECT ISNULL(SomeNullableField, 'If null, this value') FROM SomeTable
    

    PL/SQL:

    SELECT NVL(SomeNullableField, 'If null, this value') FROM SomeTable
    

提交回复
热议问题