Summary

Well, you made it through the day. Today, you learned how to manipulate data using operators, functions, constants, and the CASE statement. In addition, you learned how to create aliases for columns in the SELECT statement. These techniques will serve you well throughout the rest of this book and throughout your career in T-SQL programming.

You also learned how to manipulate and search date values. You explored how to use the CONVERT and CAST functions to change the data type of a value from one type to another, and to format dates differently.

Finally, you discovered how to use the CASE expression to evaluate the values in selected columns and return a different value based on those contents. If you find yourself asking, "How do I do ...

Get Sams Teach Yourself Transact-SQL in 21 Days, 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.