If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2

Thread: SQL XOR command

  1. #1
    Junior Member CherryCherry's Avatar
    Join Date
    Jul 2020
    Member #

    SQL XOR command


    I have doing online SQL courses and tutorials and I found a problematic question is one:

    Exclusive OR (XOR). Show the countries that are big by area (more than 3 million) or big by population (more than 250 million) but not both. Show name, population and area.

    But XOR command doesn't work. No matter how it is typed in - it doesn't accept it.

    So why the hell would they even suggest using it?


  3. #2
    Senior Member sarahswansea's Avatar
    Join Date
    Oct 2015
    Swansea, UK
    Member #
    69 times
    Not every SQL server supports xor

    But you can reformulate any "A xor B" as "(A or B) and (not A or not B)"

    People on StackOverflow seemed to have the same question:
    Tawesoft <-- hire me here if you need a Go or Python webdev

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT -6. The time now is 06:29 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2022 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: