Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close

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:

  • Text data types that can store short texts of variable length (VARCHAR) and predefined length (CHAR). We also talk about data types that store text files (TEXT, CLOB).
  • Numerical data types and the differences between integer types (INTEGER), floating point numbers (DOUBLE PRECISION), and decimal numbers (DECIMAL).
  • Identity columns and sequences, which auto-generate values and primary key identifiers (GENERATED ALWAYS BY DEFAULT, GENERATED ALWAYS BY DEFAULT AS IDENTITY).
  • Boolean and date/time data types, which are used to store true and false values (BOOLEAN) or date and time data (DATE, TIME, TIMESTAMP).
  • How to modify a column’s data type, e.g. when can you alter a column’s defined data type and what happens to the data when you do.

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.

What Do You Need to Take This Course?

  • A web browser and an internet connection.
  • Knowledge of SQL, including SELECT, INSERT, UPDATE, and DELETE.
  • Basic understanding of the CREATE TABLE syntax.

This Course Will Teach You How To:

  • Choose the right data type for different columns.
  • Auto-generate column values with GENERATED ALWAYS.
  • Create a sequence.
  • Use sequences to auto-generate values.
  • How to alter tables and change column data types.

Who Should Take This Course?

  • Beginning developers and programmers
  • Beginning database administrators (DBAs)
  • Students taking classes in relational databases
  • Anyone who wants to understand the data types used in relational databases

    Table of contents

    Progress: 0% completed 0 of 89 exercises done

    1. Text data types

    Learn about the text data types to store names, titles, descriptions, or notes in your database.

    More details Less

    2. Numerical data types

    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.

    More details Less

    3. Identity columns and sequences

    Learn how a database can auto-generate primary keys and other values.

    More details Less

    4. Boolean, Date, and Time data types

    How to store true/false information, and date and time information in your database.

    More details Less

    5. Modifying column data types

    How and when to change the data type of an existing column in a database.

    More details Less

    6. Final Quiz

    Time to test your knowledge!

    More details Less

    Reviews

    Average rating

    0/50.0 (0)

    Details

    5 Stars 0%
    4 Stars 0%
    3 Stars 0%
    2 Stars 0%
    1 Stars 0%
      Load more reviews

      Comments

      0