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

Instruction

Great work! How about this one?

Exercise

A forex agency needs a simple table to keep track of the currency exchanges it performs.

Create a table named exchange consisting of the following columns:

  • id – an integer which is the primary key.
  • currency_from – three characters.
  • currency_to – three characters.
  • quantity – an integer.
  • exchange_date – a field with a date.

Also, keep the following requirement in remind: No column can be NULL.

Stuck? Here's a hint!

Type:

CREATE TABLE exchange (
  id int PRIMARY KEY,
  currency_from varchar(3) NOT NULL,
  currency_to varchar(3) NOT NULL,
  quantity integer NOT NULL,
  exchange_date date NOT NULL
)