Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Support "IS [ NOT ] DISTINCT FROM" syntax

User_1871Jul 2 2022 — edited Jul 4 2022

Edited. My previous version of this post was incorrect.

The IS [ NOT ] DISTINCT FROM syntax is supported in some databases, but not in Oracle:
IS NOT DISTINCT FROM (null-safe equals comparison) (0 Bytes)For example, this syntax works in SQLite: (IS NOT works the same way as IS NOT DISTINCT FROM )

--Select rows where COST1 is different than COST2. 
--Treat nulls as if they are equal. Don't treat nulls as zeros.
with workorder (cost1,cost2) as (
values
( 100.00, 100.00),
(-100.00,   null),
(   null,      0),
(      0, 100.00),
(   null,   null)
)

select
  *
from
  workorder
where
  cost1 is not cost2

Result:

 cost1   cost2
------  ------
  -100    null
  null       0
     0     100

db<>fiddle (SQLite 3.27)

Could that same functionality be added to Oracle?
To me, that would be more convenient and easier to read than the usual workarounds:
Succinct way to select where COST1 is different than COST2 (treat null=null)
Coding Around NULL Values

Comments

Franck N

Hi,

i will say yes:

  • If Oracle Application Express is installed and if RESTful services have been configured during the installation (see the step Configure RESTful Services in Oracle Application Express Installation Guide), then Oracle REST Data Services supports it, including executing the RESTful services defined in Oracle Application Express.
  • Oracle REST Data Services system requirements when it comes to the DB are as follows:
    • Oracle Database (Enterprise Edition, Standard Edition or Standard Edition One) release 11.1 or later, or Oracle Database 11gRelease 2 Express Edition.
  • When it comes to APEX: version  5.1  is  ok :

APEX_REST_PUBLIC_USER

Only if using RESTful Services defined in Application Express of version 5.0 or above.

The database user used when invoking Oracle Application Express RESTful Services if RESTful Services defined in Application Express workspaces are being accessed

APEX_LISTENER

Only if using RESTful Services defined in Application Express of version 5.0 or above.

The database user used to query RESTful Services definitions stored in Oracle Application Express if RESTful Services defined in Application Express workspaces are being accessed

changes in Oracle REST Data Services

regards,

Franck

1 - 1

Post Details

Added on Jul 2 2022
3 comments
2,246 views