Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8163161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:57:30+00:00 2026-06-06T18:57:30+00:00

select ‘true’ from dual where 1 not in (null,1); when we execute this which

  • 0
select 'true' from dual where 1 not in (null,1);

when we execute this which will result nothing

what my question is:

is the above query is logically equivalent to

select 'true' from dual where 1 != null and 1 != 1;

which will result nothing just as above statement

Please clarify?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T18:57:31+00:00Added an answer on June 6, 2026 at 6:57 pm

    Correct (but note that IN is an operator, not a clause and it works like this in SQL in general, not only for Oracle).

    where 1 not in (null,1)
    

    is equivalent to:

    where 1 != null and 1 != 1
    

    which should really be written as:

    WHERE 1 NOT IN (NULL, 1)
    

    and

    WHERE 1 <> NULL AND 1 <> 1
    

    which is the same as:

    WHERE (1 <> NULL) AND (1 <> 1)
    

    which evaluates to:

    WHERE UNKNOWN AND FALSE
    

    and further as:

    WHERE FALSE
    

    So, it correctly returns no rows.


    Notice that if you had WHERE 1 NOT IN (NULL, 2), it would evaluate to WHERE UNKNOWN (left as an exercise) and no rows would be returned either.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

select tf.Id,tf.Name,tf.LName,tf.Rank,tf.Category where tf.Id not in (select fighter_id from tbl_player_fighter where league_id=91) and tf.Status
SELECT * FROM list WHERE list_item LIKE %_1375_% returns results it should not. For
SELECT 1 FROM dual where trim('X ') = 'X' Gives 1. SELECT 1 FROM
Select table1.column1, table2.column1, calcuate(table1.column2) as result from table1, table2 where table1.id = table2.fkid Say
select count(*) as count from table group by foreign_id order by count This returns
select 1 where somevalue = '' or somevalue is null from sometable I completely
SELECT plaka, party_id, sum(inf) i FROM party_sehir GROUP BY party_id, plaka This is my
SELECT distinct source_IP, timestamp FROM tb1 , tb2 WHERE tb1.source_IP not in ( SELECT
select email from mailing list This is the query i want to use if
SELECT User, COUNT(User) as count FROM Tests GROUP by User; This works. However, if

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.