Concept explainers
WHERE Statement:
“WHERE” statement is used limit the number of rows. For example:Consider a table “FTable” that has two columns named “FruitName” and “Color”. “WHERE” clause is used when there is a need to display the entire FruitName whose color is Red.
SELECT * FROM FTable WHERE color = 'red';
When the above statement is executed, red colored fruits get displayed.
AND Operator:
In SQL, “AND” keyword is used in order to check two and more than two conditions. This usually works well with “WHERE” clause.
Syntax:
SELECT * FROM table_Name WHERE condition1 AND condition2;
OR Operator:
In SQL, “OR” keyword usually returns true if any one condition is true. This usually works well with “WHERE” clause.
Syntax:
SELECT * FROM table_Name WHERE condition1 OR condition2;
Want to see the full answer?
Check out a sample textbook solutionChapter 7 Solutions
EBK DATABASE SYSTEMS: DESIGN, IMPLEMENT
- Database Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781305627482Author:Carlos Coronel, Steven MorrisPublisher:Cengage Learning