* Today we added some select clauses that contained filters (WHERE, LIKE) to our array, e.g.
"SELECT * FROM ApprovedTravelRequests WHERE Location = 'Richmond, VA'"
* The above query would return all records from the table where the Location was Richmond, VA.
* We can also run a "fuzzy" query that only looks for certain letters within the words:
1. "SELECT * FROM ApprovedTravelRequests WHERE Location LIKE 'R%'"
2. "SELECT * FROM ApprovedTravelRequests WHERE Location LIKE '%R'"
3. "SELECT * FROM ApprovedTravelRequests WHERE Location LIKE '%R%'"
* Example 1 would return all records where the location STARTS with an R, example 2 would return all records where the location ENDS with an R, example 3 would return all records where the location CONTAINS an R ANYWHERE in the name.
* The Percentage sign % is called a WILD CARD CHARACTER.
* We can also run queries using the relational operators >, <, >=, <=, <>, =, for example:
"SELECT * FROM ApprovedTravelRequests WHERE [Travel Cost] >= 1000"
* When using a numeric value there is no need to put it inside ''.
* We can also run queries using the logical operators AND, OR, for example:
"SELECT * FROM ApprovedTravelRequests WHERE [First Name] = 'Janet' And [Last Name] = 'Dunford'"
"SELECT * FROM ApprovedTravelRequests WHERE [First Name] = 'Janet' Or [Last Name] = 'Tirrell'"