Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Identity columns
Sequences
Summary

Instruction

Good. Everything works well. Now it's your turn to create a table with GENERATED BY DEFAULT AS IDENTITY. Remember to put that information after the column type!

Exercise

Create a table called theater with the following columns:

  1. theater_id – The primary key, an integer column with consecutive numbers automatically generated (GENERATED BY DEFAULT AS IDENTITY).
  2. name – Up to 30 characters.
  3. city – Up to 30 characters.

Important: You should also be able to provide your own values for the theater_id column.