Choose the right type of data for your needs. A data type tells the database what kind of information a column will store. Learn about common data types in SQL Server, MySQL, Oracle, and PostgreSQL.
Welcome to Data Types in SQL! This is the second course in the Creating Database Structure track. We assume that you already know how to create a table in SQL. If not, take The Basics of Creating Tables in SQL before you start this course.
Data types are extremely important. A data type tells the database the kind of information (number, text, date, etc.) each column will store. It influences the functions and operations you can do on a column, how much space the column will take, how the database stores the data internally, and so on.
In this course, we will discuss the most basic data types and the primary differences between them. After you complete the exercises, you’ll know how to select the right data type for whatever information you want to store.
This interactive tutorial is based on standard SQL. But don't worry. The data types shown here will work in all popular relational database management systems, including SQL Server, MySQL, Oracle, and PostgreSQL.
Are you a beginning IT professional, computer science student, or database administrator (DBA)? Do you work as a programmer or developer? If you need to understand or work with data types in a relational database, this is the perfect course for you.
In Data Types in SQL, we discuss:
This course is interactive. You’ll learn how to work with different data types by writing real SQL commands and solving exercises directly in your web browser. Our platform runs your command and verifies your solution. You don’t need to install any software.
Learn about the text data types to store names, titles, descriptions, or notes in your database.
Master numeric data types in SQL. Learn about the caveats of mathematical operators in your database. Learn how to choose the right numerical data type for your data.
Learn how a database can auto-generate primary keys and other values.
How to store true/false information, and date and time information in your database.
How and when to change the data type of an existing column in a database.