121k views
1 vote
What does adding AND to a search query do

2 Answers

6 votes

Answer:

Widens the search

User Nikhil
by
5.7k points
1 vote

Answer:

Adding AND to a search query provides the search results based on conditions imposed on both side of AND.

Step-by-step explanation:

AND is often used in search queries to filter the search results based on multiple conditions.

Let's illustrate the working of AND using following example.

Consider the student table shown below.

Now consider the following query is run on student table.

Select *

From Student

Where Marks > 50 AND Age >15;

Since here AND condition is used in Where clause. Therefore, search result will include all those tuples in which the marks value is more than 50 and along with that the age value is more than 15.

Thus the result of above query will be as follows:

What does adding AND to a search query do-example-1
What does adding AND to a search query do-example-2
User Nicola Gallazzi
by
5.4k points