Beginning SQL
Beginning SQL Beginning SQL
The BETWEEN operator functions exactly the same way, except it’s shorter — it saves on typing and also makes the SQL more readable. The following SQL uses the BETWEEN operator to select films with a rating between 3 and 5: SELECT FilmName, Rating FROM Films WHERE Rating BETWEEN 3 AND 5 If you use the BETWEEN operator, you see that it provides exactly the same results as the “greater than or equal to” (>=) and “less than or equal to” (
- Page 122: 2 Entering Information The last cha
- Page 126: like this: INSERT INTO Category VAL
- Page 130: Inserting Data into the Case Study
- Page 134: The WHERE Clause So far you’ve se
- Page 138: Try It Out Using Logical Operators
- Page 142: Exercises 1. Three new members have
- Page 148: Chapter 3 54 MemberId FirstName 1 K
- Page 152: Chapter 3 The results are as follow
- Page 156: Chapter 3 The results to this query
- Page 160: Chapter 3 FavCategory (CategoryId,
- Page 164: Chapter 3 Logical Operators and Ope
- Page 168: Chapter 3 The statement returns the
- Page 172: Chapter 3 NOT Operator Examples thu
- Page 178: The final condition required is a c
- Page 182: In some database systems, the LIKE
- Page 186: The second query is a negative, in
- Page 190: Because both conditions (YearReleas
- Page 194: YearReleased 1984 1980 1977 1975 19
- Page 198: First, the database system orders t
- Page 202: LastName FirstName DateOfBirth Nigh
- Page 206: The preceding SQL returns the follo
- Page 210: If you put square brackets around i
- Page 214: Finally, if you want to use an alia
- Page 218: Member Name The member is called Ka
- Page 222: FilmName YearReleased Rating Sense
The BETWEEN operator functions exactly the same way, except it’s shorter — it saves on typing and also<br />
makes the <strong>SQL</strong> more readable. The following <strong>SQL</strong> uses the BETWEEN operator to select films with a rating<br />
between 3 and 5:<br />
SELECT FilmName, Rating<br />
FROM Films<br />
WHERE Rating BETWEEN 3 AND 5<br />
If you use the BETWEEN operator, you see that it provides exactly the same results as the “greater than or<br />
equal to” (>=) and “less than or equal to” (