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

Instruction

Perfect! How about this question?

Exercise

Excellent! Our car_ride table looks like this now:

CREATE TABLE car_ride (
  id integer PRIMARY KEY,
  start_place varchar(32),
  end_place varchar(32),
  distance decimal(6, 2)
);

So far, we've been using a sequence to generate IDs. Let's change that. First, add a GENERATED ALWAYS identity to the id column.