Data types

Introduction to SQL

Jasmin Ludolf

Senior Data Science Content Developer, DataCamp

Database storage

Many people using a database server

Introduction to SQL

SQL data types

  the patrons table with each field highlights and indicated that they are each one data type

  • Different types of data are stored differently and take up different space
  • Some operations only apply to certain data types
Introduction to SQL

Strings

the patrons table with the name field highlighted as an example of a string field

  • A string is a sequence of characters such as letters or punctuation

  • VARCHAR is a flexible and popular string data type in SQL

Introduction to SQL

Integers

the patrons table with the member_year field highlighted as an example of an integer field

  • Integers store whole numbers
  • INT is a flexible and popular integer data type in SQL
Introduction to SQL

Floats

the patrons table with the total_fine field highlighted as an example of a float field

  • Floats store numbers that include a fractional part
  • NUMERIC is a flexible and popular float data type in SQL
Introduction to SQL

Schemas

A schema for the library database

Introduction to SQL

Let's practice!

Introduction to SQL

Preparing Video For Download...