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.
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;