Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Numbers
Boolean
Date and time
Summary

Instruction

Excellent! You are now ready to move on.

Apart from integer numbers, there are also fractions. In our database, we can use DOUBLE and REAL to store them. Just like with integer types, each database has its own types for the so-called floating point numbers. Their ranges and precision is always given in the documentation.

Exercise

Peter wants to experiment with new column types. He wants to introduce weight in the user profiles so that people could quickly browse the site based on their preference for slim or chubby people.

For now, let's just create a simple table called body with an integer column user_id and a DOUBLE column weight.

Stuck? Here's a hint!

Type

CREATE TABLE body (
    user_id int,
    weight double
);