O'Reilly logo

SQL Queries for Mere Mortals: A Hands-On Guide to Data Manipulation in SQL, Second Edition by Michael J. Hernandez, John L. Viescas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Translating Your Request into SQL

When you request information from the database, it’s usually in the form of a question or a statement that implies a question. For example, you might formulate statements such as these:

“Which cities do our customers live in?”

“Show me a current list of our employees and their phone numbers.”

“What kind of classes do we currently offer?”

“Give me the names of the folks on our staff and the dates they were hired.”

After you know what you want to ask, you can translate your request into a more formal statement. You compose the translation using this form:

Select <item> from the <source>

Start by looking at your request and replacing words or phrases such as “list,” “show me,” “what,” “which,” and “who” with ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required