Copyright

Ch 3: SQL Data Types

About This Chapter

This tutorial chapter covers the data types that are used in the SQL programming language. These short lessons educate you on the definition and function of each data type.

SQL Data Types: Chapter Summary

Like other programming languages, SQL (Structured Query Language) uses different data types to specify the type of data that an object will hold. These SQL tutorial lessons outline the data types that are used in this programming language. With instruction from experienced SQL instructors, you'll find clear and straightforward definitions of several SQL data types, including CHAR, BOOLEAN, TIMESTAMP and more.

After you complete each lesson, you can take a short self-assessment quiz to make sure you fully understand the purposes of these types of data. You can access these lessons on any computer or mobile device, which allows you to learn about SQL at any time that's convenient.

The chapter covers the following SQL data types:

  • CHAR and VARCHAR
  • INT and SMALLINT
  • DECIMAL and NUMERIC
  • REAL, FLOAT and DOUBLE
  • BOOLEAN
  • DATE, TIME and TIMESTAMP
  • BINARY LARGE OBJECT

7 Lessons in Chapter 3: SQL Data Types
Test your knowledge with a 30-question chapter practice test
SQL Data Types: CHAR & VARCHAR

1. SQL Data Types: CHAR & VARCHAR

In SQL programming, two of the most common data types you will come across are CHAR and VARCHAR. In this lesson, we will review the differences between the two types, seeing how each is designed for different types of data.

SQL Data Types: INT & SMALLINT

2. SQL Data Types: INT & SMALLINT

As databases are often used to store numbers and other quantitative data, it is important to recognize differences between data types. This lesson explains a number of different styles.

SQL Data Types: DECIMAL & NUMERIC

3. SQL Data Types: DECIMAL & NUMERIC

If you are dealing with data that has decimal values, then you're going to want to know about the decimal and numeric data types in SQL. While they are very similar, they are distinct enough that you should know when to use which. We'll learn that and more in this lesson.

SQL Data Types: REAL, FLOAT & DOUBLE

4. SQL Data Types: REAL, FLOAT & DOUBLE

Data, data everywhere, but which type should I use? In the era of large data and big numbers, it's important to understand the various data types available in SQL. This lesson will cover three: real, float, and double.

SQL Data Types: BOOLEAN

5. SQL Data Types: BOOLEAN

Yes or no? This decision is one of the most basic forms of coding that exists and is representative of Boolean language. In fact, in just 10 minutes, you can pick up enough to narrow down your search engine results. Here, it refers to a simple yes or no question for SQL.

SQL Data Types: DATE, TIME & TIMESTAMP

6. SQL Data Types: DATE, TIME & TIMESTAMP

From keeping track of changes to recording dates, SQL has some features built into its data types that not only help make sure that times and dates are properly formatted, but also that records are kept free from any alterations. In this lesson, we'll learn about the DATE, TIME and TIMESTAMP data types.

SQL Data Types: BINARY LARGE OBJECT

7. SQL Data Types: BINARY LARGE OBJECT

Watch out for the BLOB! A Binary Large Object, or BLOB, is a data type in SQL that allows for HUGE values in tables. This lesson will cover the concept and provide some examples.

Chapter Practice Exam
Test your knowledge of this chapter with a 30 question practice chapter exam.
Not Taken
Practice Final Exam
Test your knowledge of the entire course with a 50 question practice final exam.
Not Taken

Earning College Credit

Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? Study.com has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Other Chapters

Other chapters within the SQL Tutorial & Training course

Support