From the course: Microsoft SQL Server 2022 Essential Training

Unlock this course with a free trial

Join today to access over 23,400 courses taught by industry experts.

SQL Server data type options

SQL Server data type options

- [Instructor] Now that we know why we need to choose appropriate data types, you're probably wondering what your data type options are in SQL Server, and what makes them different. So let's get more specific. The two main categories are whether you need to store text data or if you need to store numbers. Let's tackle numbers first. First, we have several data types that do not store fractions. They can represent hold numbers only. The smallest number that we can store is called a bit, and it's literally just a 0 or a 1. This might not seem like it's going to be very useful at first, but it's actually a common data type to choose. The bit can be used to define true or false, or on or off, or yes or no. Basically, anything that you would use a checkbox to represent in a user interface, is probably connected to a bit data type. No surprise here, the bit data type takes one computer bit to store for each record. In…

Contents