Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Modifying columns
6. Changing column type – exercise 2
Modifying identities
Modifying sequences
Summary

Instruction

Good job! Naturally, varchar isn't the only column type that you can extend. Let's try another.

Exercise

The agency also has an issue with registering all their theatrical property purchases. They've created the table purchase in the following way:

CREATE TABLE purchase (
  id integer primary key,
  property_id integer,
  amount decimal(4, 2)
);

Your task is to extend the column amount so that it accepts 10 digits in total, with two after the decimal.

Stuck? Here's a hint!

Syntax reminder:

ALTER TABLE artwork ALTER COLUMN title SET DATA TYPE varchar(128);