answersLogoWhite

0

It is the same difference between an OR Boolean and AND Boolean. In an OR query, you are looking for something that matches one of several possible values, while in an AND query, you are looking for something that matches all of several possible values.

-- Find the first name of anyone in the USA, or have a last name starting with A.

SELECT FirstName FROM Contacts WHERE Country = 'USA' OR LastName LIKE 'A%'

-- Find the first name of anyone in the USA that also has a last name starting with A

SELECT FirstName FROM Contacts WHERE Country = 'USA' AND LastName LIKE 'A%'

The difference between these two is that the first one will return people outside the USA if their last name starts with an A, while in the second query, only people inside the USA with the last name starting with A will be returned.

AND will always return the same or fewer values than OR.

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What is the difference between a query and a report?

A query (inquiry) is seeking information. A report provides information.


What is the difference between hql and sql?

one of the difference is HQL does not support distinct but SQL supports the distinct in the query


What is the Difference between transaction and query?

The query is simple set of insert,update,delete statement where as transaction is a set of statement which follows ACID properties.


What is the difference between a simple query and a complex query?

A simple search is one based on a single term or criterion.


What is the difference between simple and complex queries?

a simple query is when you answer a database to do something and a complex/parameter query is a prompt to run a question to find something


What is the difference between SQL2005 and Excel 2007?

SQL is Structured Query Language, and relates to databases. Excel is a spreadsheet application.


What is the difference between query datasheet and a table datasheet?

A query datasheet displays the results of a query operation, showing data based on specified criteria or calculations. A table datasheet displays the data in a table format, representing information stored in a database table. In essence, a query datasheet is derived from a table datasheet and is dynamic based on the query criteria.


Difference between SQL and OQL?

in some cease both are the same they use query language but in fact the out puts are very deference


Difference between query studio and report studio?

Query studio is a subset (in feature) of Report Studio. It is manily used for Ad-hoc queries. But report studio used for complex and fancy report development.


Tell you very clearly what is the difference between sql and mysql?

SQL is a universal query language used to access relational data. MySQL is a database storage engine which utilizes the SQL query language as the means to interface with the data stored.


Difference between sql and sql plus?

SQL*PLUS is a interface between user and Oracle database. It Provide an environment to use the SQL which is a query language to communicate with oracle database


What is the difference between QBE and SQL?

Query by Example (QBE) is a database query language for relational databases. A QBE parser parses the search query and looks for the keywords. A more formal query string, in languages such as SQL, is then generated, which is finally executed. However, when compared with a formal query, the results in the QBE system will be more variable.SQL (Structured Query Language) SQL is a set-based, declarative query language, not an imperative language such as C or BASIC. However, there are extensions to Standard SQL which add procedural programming language functionality, such as control-of-flow constructs