Search⌘ K

Data Types

Explore the fundamental SQL data types used to define columns in database tables. Understand numeric, date, string, JSON, and spatial data categories and how they shape structured data. Learn to select appropriate types for attributes like names, dates, and values when creating tables.

We'll cover the following...

Data Types

In the previous lesson we created a database and now we’ll learn how to create tables within a database. But before we create a table, we’ll examine the concept of a table. A database is primarily made up of tables and as explained before, a table consists of columns. Each column is an attribute of an entity that is defined by the table. For instance, the first table we’ll create will consist of actors. What information do we want to hold about actors? We can be interested in the first and last names, age, date of birth, marital status, gender, etc., of an actor, all attributes that define some aspect of an actor.

Our table, Actors ...