Dates and Times in SQL Server: DATETIMEOFFSET

This post continues our look at date and time data types in SQL Server. SQL Server 2008 introduced new data types to handle dates and times in a more intelligent way than the DATETIME and SMALLDATETIME types that we looked at previously. This week, we look at the last new data type, DATETIMEOFFSET. If you’d like
-> Continue reading Dates and Times in SQL Server: DATETIMEOFFSET

Dates and Times in SQL Server: DATETIME2

This post continues our look at date and time data types in SQL Server. SQL Server 2008 introduced new data types to handle dates and times in a more intelligent way than the DATETIME and SMALLDATETIME types that we looked at previously. This week, we look at the DATETIME2 data type. I’m not the first person
-> Continue reading Dates and Times in SQL Server: DATETIME2

watch

Dates and Times in SQL Server: TIME

This post continues our look at date and time data types in SQL Server. SQL Server 2008 introduced new data types to handle dates and times in a more intelligent way than the DATETIME and SMALLDATETIME types that we looked at previously. What is the time? This week, we look at the TIME data type. It
-> Continue reading Dates and Times in SQL Server: TIME

Calendar

Dates and Times in SQL Server: DATE

This post continues our look at date and time data types in SQL Server. SQL Server 2008 introduced new data types to handle dates and times in a more intelligent way than the DATETIME and SMALLDATETIME types that we looked at previously. The first one we look at this week is DATE. Whereas DATETIME uses eight
-> Continue reading Dates and Times in SQL Server: DATE

Dates and Times in SQL Server: SMALLDATETIME

Last week I spoke about a world wary data type for storing dates and times in a single column, with a granularity of three milliseconds, DATETIME. But let’s say you don’t need that kind of accuracy and are happy with a granularity to the nearest minute. Maybe you’re storing time cards and don’t think it’s
-> Continue reading Dates and Times in SQL Server: SMALLDATETIME

Dates and Times in SQL Server: DATETIME

Last year I ran a series of posts about Database Fundamentals. Over the next few weeks, I will cover the basics of various date and time data types in SQL Server, when to use them, and which functions to use for date and time calculations. This week will start with probably the best-known data type,
-> Continue reading Dates and Times in SQL Server: DATETIME

Speaking at SQLSaturday 725 in Victoria

Victoria is on an island off the coast of Vancouver, British Columbia. The island is wisely called Vancouver Island. It is beautiful there, and I wouldn’t mind retiring there someday. Those of you who listen to my convoluted stories will recall that it was on Vancouver Island that I broke my foot in 2013. Hopefully
-> Continue reading Speaking at SQLSaturday 725 in Victoria

Where To From Fundamentals?

The Database Fundamentals series is now done. We started with understanding what a database is, and then spent a little time understanding how databases store text, known as collation. The next step was understanding data types in general, and how SQL Server stores them. After that was understanding normalization, with a focus on only having
-> Continue reading Where To From Fundamentals?

Post image

How to write an UPDATE query

My First UPDATE Statement Last week we covered how to put information into a table using an INSERT statement. This week we will learn how to make changes to data that is already in a table using an UPDATE statement. We are also going to learn all about why the WHERE clause is so important.
-> Continue reading How to write an UPDATE query