Get startedGet started for free

Wrapping things up

1. Wrapping things up

Congratulations, you've reached the end of this course. I hope you enjoyed learning about SQL Server functions for manipulating data as much as I enjoyed creating this material. Let's make a quick summary of the main things you learned.

2. Chapter 1: Choosing the appropriate data type

In Chapter 1, we discussed about the most important data types supplied by SQL Server. Choosing the appropriate type for your columns, variable or expression can make a big difference in the performance of the queries. There are three major categories of data types: numeric, date and time and characters. Data conversion was another topic. In some cases, this is done behind the scenes, by SQL Server and it is called implicit conversion. Other times, you need to explicitly convert your data.

3. Chapter 2: Manipulating time in SQL Server

The second chapter introduced the most important date and time functions. We discussed functions that return date and time information from the operating system. The most commonly used is GETDATE(). The functions returning parts of a date are also important. Some examples are: YEAR(), MONTH(), and DAY(). Then, you learned how to perform arithmetic operations on dates, using DATEADD() and DATEDIFF(). And you also know how to validate if an expression is a date.

4. Chapter 3: Working with strings

Chapter 3 was about manipulating strings. You learned about the functions that look for an expression within an string and return its position. CHARINDEX() and PATINDEX() were discussed. Transforming the appearance of a string was another topic. You can do that with functions like UPPER(), LOWER(), LEFT(), and RIGHT(). You can apply functions on groups of strings. It is now easy to create a string from parts or to break one into pieces by using built-in functions provided by SQL Server: STRING_AGG() and STRING_SPLIT().

5. Chapter 4: Recognizing numeric data properties

Last but not least, Chapter 4 introduced the functions applied to numeric data. You can aggregate data in your queries with SUM(), MIN(), MAX(), and AVG(). With the analytic functions, you can easily perform calculations on subsets of rows and retrieve them in your queries, without the need to use the 'GROUP BY' clause. These are: FIRST_VALUE(), LAST_VALUE(), LAG() and LEAD(). There are built-in functions for performing mathematical operations as well. For example, you can calculate the absolute value of an expression or raise a number to a specified power.

6. Congratulations!

You've made a lot of progress and knowing about these functions will make your database-related tasks a lot easier and fun. I enjoyed creating this course and sharing this experience with you. Hope it serves you well in your future encounters with SQL server.