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

  • Home
  • SEARCH
  • 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 8255805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:39:03+00:00 2026-06-08T01:39:03+00:00

Suppose I have this statement: SELECT * FROM MyTable WHERE a = 1 or

  • 0

Suppose I have this statement:

SELECT * FROM MyTable WHERE a = 1 or b = 2 and c = 3

Does that mean: (a = 1) OR (b = 2 AND c = 3) or does it mean (a = 1 or b = 2) AND c = 3? Can I change what it means, i.e. execute the OR before the AND or is this not possible?

  • 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-08T01:39:05+00:00Added an answer on June 8, 2026 at 1:39 am

    From Technet:

    When more than one logical operator is used in a statement, AND
    operators are evaluated first. You can change the order of evaluation
    by using parentheses.

    So yes, it means (a = 1) OR (b = 2 AND c = 3).

    You can force the behavior you want by writing the parentheses as you did above: (a = 1 OR b = 2) AND c = 3

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

Sidebar

Related Questions

Hi I have this update statement UPDATE OPENQUERY(linkedServerToOracle ,SELECT T$TDAT FROM BAAN.TTDSLS031010 WHERE T$CUNO='003098'
Suppose I have a statement like the following select * from table where column
Suppose I have this: <select id=myselect> <option rel=a>1</option> <option rel=b>2</option> <select> How do I
I have a problem in my select statement in my query. This sql query
I have this code to select all the fields from the 'jobseeker' table and
suppose I have a LIKE sql statement stored in a variable like this: $movie_title
I have this foreach statement that is supposed to cycle through an array, but
I have a query that looks like this WITH CTE AS ( SELECT ROW_NUMBER()
Suppose i have this sql statement and I have executed a sql command to
Suppose I have this class: class MyClass(object): def uiFunc(self, MainWindow): self.attr1 = foo self.attr2

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.