Introduction
UNIQUE
NOT NULL
CHECK
DEFAULT
31. DEFAULT - Sequences #2
Summary

Instruction

Good, the first step is behind us. Let's proceed.

Exercise

Just to remind you: in order to get the next value of the sequence my_sequence, we use the expression:

nextval('my_sequence')

Now, change the template we provided. We don't want the DEFAULT value of id to be 1. Replace it with the next value of the sequence id_seq.

Code editor

TableConsole