Head First SQL, 2nd Edition

Book description

What will you learn from this book?

Do you have an abundance of data but don't know how to make sense of it? Do you want to gain useful insights from your data, but you're not sure where to begin? Mining data is a vital, well-paying skill, and SQL provides the most fundamental way to query and manage data. But learning SQL can be intimidating. This thoroughly revised book teaches you SQL fundamentals in a painless and enjoyable manner. With the Head First series' hands-on, conversational style, you'll quickly grasp SQL concepts, then move to intermediate topics, including stored procedures and cloud databases. You'll gain the knowledge, skills, and confidence necessary to get the most out of your data with SQL.

Why does this book look so different?

If you've read a Head First book, you know what to expect: a visually rich format designed for the way your brain works. If you haven't, you're in for a treat. With this book, you'll learn about SQL through a multisensory experience that engages your mind—rather than a text-heavy approach that puts you to sleep.

Publisher resources

View/Submit Errata

Table of contents

  1. Brief Table of Contents (Not Yet Final)
  2. 1. Databases and Tables: Organizing Your Information
    1. Defining your data
    2. Think about your data in categories
    3. Build a table of information
    4. What is SQL?
    5. The anatomy of a table
    6. A table of travel data
    7. BE the table
    8. BE the table Solution
    9. What’s a database?
    10. Databases contain related information
    11. Take command!
    12. Your first SQL commands
    13. Creating a SQL table
    14. Steps for creating a general SQL table
    15. Your table is ready
    16. A selection of common data types
      1. Data types for text
      2. Data types for numbers
      3. Data types for dates and times
      4. A data type for other things
    17. Who am I?
    18. Your table, DESCribed
    19. Changing table properties
    20. Code Magnets
    21. Code Magnets Solution
    22. Dropping and recreating tables
    23. Adding a new column
    24. Hitting your cruising altitude
    25. SQLcross
    26. Your SQL toolbox
    27. Who am I? Solution
    28. SQLcross Solution
  3. 2. Inserting Data: Adding Table Rows
    1. Setting up a database with tables
    2. Checking back in with Abby
    3. Inserting data into tables
    4. Creating your INSERT statement
    5. See your table with SELECT
    6. A new recommendation
    7. Records with missing values
    8. Revisiting your table
    9. Controlling NULLs...
    10. ... and Setting DEFAULTs
    11. Variations on INSERT #1
    12. Variations on INSERT #2
    13. Variations on INSERT #3
    14. A punctuation problem
    15. Unmatched single quotes
    16. INSERT data with single quotes in it
    17. It’s only up from here!
    18. SQLcross
    19. Your SQL toolbox
    20. SQLcross Solution
  4. 3. The Select Statement: Finding Your Information
    1. Searching for a destination
    2. SELECT specific columns
    3. Specify columns... and their order
      1. SELECT specific columns for faster results
    4. An even better SELECT
    5. WHERE to next?
    6. WHERE filters out rows
    7. WHERE results
    8. Finding numeric values
    9. Expanding a numeric search
    10. Short travel times using less than
    11. Comparison Operators
    12. Finding numeric data with comparison operators
    13. Comparison operators for text
    14. Who am I?
    15. Who am I? Solution
    16. SQLcross
    17. Your SQL Toolbox
    18. SQLcross Solution
  5. About the Author

Product information

  • Title: Head First SQL, 2nd Edition
  • Author(s): Kimberly Fessel
  • Release date: August 2026
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781098163655