Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Modifying columns
2. Inserting oversized values
Modifying identities
Modifying sequences
Summary

Instruction

Suppose we work for an art gallery and we have the following table:

CREATE TABLE artwork (
  id integer PRIMARY KEY,
  title varchar(32),
  author varchar(32)
);

We create the table and start filling it with information. At some point, however, we notice that the field title is too short – there are certain works whose names are longer than 32 characters. What happens if we try to add them?

Exercise

Try to run the template query: it attempts to add an artwork which has a very long name.

As you can see, the query failed. The work's title was too long.