Skip to Content
Head First SQL
book

Head First SQL

by Lynn Beighley
August 2007
Beginner to intermediate
608 pages
13h 12m
English
O'Reilly Media, Inc.
Content preview from Head First SQL

Chapter 2. The SELECT Statement: Gifted data retrieval

image with no caption

Is it really better to give than retrieve? When it comes to databases, chances are you’ll need to retrieve your data as often than you’ll need to insert it. That’s where this chapter comes in: you’ll meet the powerful SELECT statement and learn how to gain access to that important information you’ve been putting in your tables. You’ll even learn how to use WHERE, AND, and OR to selectively get to your data and even avoid displaying the data that you don’t need.

Date or no date?

Greg’s finished adding all the sticky notes into his my_contacts table. Now he’s ready to relax. He’s got two tickets to a concert, and he wants to ask one of his contacts, a girl from San Francisco, out on a date.

He needs to find her email address, so he uses the SELECT statement from Chapter 1 to view his table.

SELECT * from my_contacts;
image with no caption
image with no caption
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Head First SQL, 2nd Edition

Head First SQL, 2nd Edition

Kimberly Fessel
Learning SQL

Learning SQL

Ben Forta
Practical SQL

Practical SQL

Anthony DeBarros

Publisher Resources

ISBN: 9780596526849Supplemental ContentErrata Page