Beginning SQL
Beginning SQL Beginning SQL
Chapter 3 86 FullName First name is Katie, last name is Smith First name is Susie, last name is Simons First name is John, last name is Jackson First name is Steve, last name is Gee First name is John, last name is Jones First name is Jenny, last name is Jones First name is Jack, last name is Johnson First name is Seymour, last name is Botts First name is Jamie, last name is Hills First name is Stuart, last name is Dales First name is William, last name is Doors First name is Doris, last name is Night Likewise, you can assign more than one alias in the SELECT statement. For example, the following statement uses the aliases Surname and ChristianName: SELECT LastName AS Surname, FirstName AS ChristianName FROM MemberDetails; The results of the preceding SELECT statement are as follows: Surname ChristianName Smith Katie Simons Susie Jackson John Gee Steve Jones John Jones Jenny Johnson Jack Botts Seymour Hills Jamie Dales Stuart Doors William Night Doris
- 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 176: Chapter 3 2. Using the following SQ
- Page 180: Chapter 3 When you execute the quer
- Page 184: Chapter 3 Now that you’re acquain
- Page 188: Chapter 3 It’s as simple as that!
- Page 192: Chapter 3 76 YearReleased 1947 1967
- Page 196: Chapter 3 78 FilmName Rating Gone w
- Page 200: Chapter 3 2. Add a WHERE clause to
- Page 204: Chapter 3 Executing this SQL provid
- Page 208: Chapter 3 84 FullName First name is
- 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
- Page 226: Figure 3-1 The first task when tack
- Page 230: That’s all well and good, but so
- Page 234: Category FirstName LastName War Jen
- Page 238: Extracting Information FirstName La
- Page 242: If you take this further and join t
- Page 246: SELECT * FROM FavCategory Figure 3-
- Page 250: Category MemberId Thriller 5 Thrill
- Page 254: Remember to add brackets around the
- Page 258: surprisingly, the MemberDetails tab
Chapter 3<br />
86<br />
FullName<br />
First name is Katie, last name is Smith<br />
First name is Susie, last name is Simons<br />
First name is John, last name is Jackson<br />
First name is Steve, last name is Gee<br />
First name is John, last name is Jones<br />
First name is Jenny, last name is Jones<br />
First name is Jack, last name is Johnson<br />
First name is Seymour, last name is Botts<br />
First name is Jamie, last name is Hills<br />
First name is Stuart, last name is Dales<br />
First name is William, last name is Doors<br />
First name is Doris, last name is Night<br />
Likewise, you can assign more than one alias in the SELECT statement. For example, the following statement<br />
uses the aliases Surname and ChristianName:<br />
SELECT LastName AS Surname, FirstName AS ChristianName<br />
FROM MemberDetails;<br />
The results of the preceding SELECT statement are as follows:<br />
Surname ChristianName<br />
Smith Katie<br />
Simons Susie<br />
Jackson John<br />
Gee Steve<br />
Jones John<br />
Jones Jenny<br />
Johnson Jack<br />
Botts Seymour<br />
Hills Jamie<br />
Dales Stuart<br />
Doors William<br />
Night Doris