Summary

We began the chapter with a brief overview of expressions. We then explained that you need to understand data types before you can build expressions and went on to discuss each of the major data types in some detail. We next showed you the CAST function and explained that you’ll often use it to change the data type of a column or literal so that it’s compatible with the type of expression you’re trying to build. We then covered all the ways that you can introduce a constant value—a literal—into your expressions. We then introduced you to the concept of using an expression to broaden or narrow the scope of information you retrieve from the database. We also explained that an expression is some form of operation involving numbers, character ...

Get SQL Queries for Mere Mortals: A Hands-On Guide to Data Manipulation in SQL, Second Edition 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.