Chapter 2. The SELECT Statement: Gifted data retrieval
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;
Get Head First SQL now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.