It can be helpful to specify how many results you want to see. Learn to do this with the LIMIT keyword.
- [Instructor] There's another operator we can use…in our queries too which lets us be a little bit…less specific and lets us look for values that match…some text called the LIKE operator.…If we wanted to say give me all of the records…whose state starts with the letter C,…we could write state equals CA, state equals CO,…state equals CT, and so on.…Or we could say state like C%,…saying match the letter C and then whatever is…after that is fine.…We just care about matching the first character.…To write that, I'll write…SELECT first_name,…last_name, state…WHERE state LIKE, and a single quote,…and in this case, C%, and then a closing single quote.…
Running this, I can see that it's matched the state…where the C is at the beginning,…and then whatever comes after it is fine.…Here's California, Colorado,…Connecticut, and so on.…Or we could change that around and put N first.…Or we could put the percent at the beginning…to match any state ending with N.…
Or we could say give me all of the first names…that start with A,…or that start with J.…
- Name the predicate of the following statement: SELECT EyeColor, Age FROM Student WHERE FirstName = 'Tim' ORDER BY LastName ASC;
- Explain what to use to enforce the order in which an expression must be evaluated if the WHERE clause contains multiple expressions to evaluate.
- Identify the best option to join two tables in a database to be able to display data from both.
- List a data type that is not numeric.
- Determine the result of running the following statement on a table containing columns col_1 and col_2:
- INSERT INTO Box (col_1, col_2) VALUES ('A', 'B'), ('A', 'B'), ('A', 'B'), ('A', 'B');
- Determine the best approach of deleting Jon Ramirez (ID 3452) from a Student table.